BrDnzz Posted December 3, 2013 Report Share Posted December 3, 2013 Just wondering is there a script to stop people from salvaging parts off peoples vehicles in trader cities, been having alot of problems with people taking wheels off other peoples cars soon as they buy them Link to comment Share on other sites More sharing options...
0 cen Posted December 3, 2013 Report Share Posted December 3, 2013 Replace this section in fn_selfActions.sqf with the one below: //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { _hasKey = _ownerID in _temp_keys; _oldOwner = (_ownerID == dayz_playerUID); if (s_player_repair_crtl < 0) then { dayz_myCursorTarget = _cursorTarget; _menu = dayz_myCursorTarget addAction ["Repair Vehicle", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; if(!locked _cursorTarget) then { _menu1 = dayz_myCursorTarget addAction ["Salvage Vehicle", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu1];}; s_player_repair_crtl = 1; } else { {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = []; s_player_repair_crtl = -1; }; }; WEB11 1 Link to comment Share on other sites More sharing options...
0 BrDnzz Posted December 4, 2013 Author Report Share Posted December 4, 2013 cheers buddy worked fantastic :) Link to comment Share on other sites More sharing options...
0 ABRICOT Posted December 14, 2013 Report Share Posted December 14, 2013 It's an anti-salvage for locked vehicle ? Link to comment Share on other sites More sharing options...
0 cen Posted December 14, 2013 Report Share Posted December 14, 2013 Yes, removes the ability to salvage a locked vehicle. Link to comment Share on other sites More sharing options...
0 WEB11 Posted January 2, 2014 Report Share Posted January 2, 2014 Awesome! Link to comment Share on other sites More sharing options...
0 Carp! Posted February 10, 2014 Report Share Posted February 10, 2014 Doesn't appear to work for 1.0.4.1. Previously worked for 1.0.4 though. Link to comment Share on other sites More sharing options...
0 blacksheep25 Posted February 11, 2014 Report Share Posted February 11, 2014 Doesn't appear to work for 1.0.4.1. Previously worked for 1.0.4 though. Try this one for 1.0.4.1, haven't tested it tho it should work. //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { _hasKey = _ownerID in _temp_keys; _oldOwner = (_ownerID == dayz_playerUID); if (s_player_repair_crtl < 0) then { dayz_myCursorTarget = _cursorTarget; _menu = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_REPAIRV", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; if(!locked _cursorTarget) then { _menu1 = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_SALVAGEV", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; s_player_repairActions set [count s_player_repairActions,_menu1];}; s_player_repair_crtl = 1; } else { {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = []; s_player_repair_crtl = -1; }; }; Link to comment Share on other sites More sharing options...
0 (HPG) Heavy Posted February 11, 2014 Report Share Posted February 11, 2014 Try this one for 1.0.4.1, haven't tested it tho it should work. //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { _hasKey = _ownerID in _temp_keys; _oldOwner = (_ownerID == dayz_playerUID); if (s_player_repair_crtl < 0) then { dayz_myCursorTarget = _cursorTarget; _menu = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_REPAIRV", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; if(!locked _cursorTarget) then { _menu1 = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_SALVAGEV", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; s_player_repairActions set [count s_player_repairActions,_menu1];}; s_player_repair_crtl = 1; } else { {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = []; s_player_repair_crtl = -1; }; }; Gave it a shot, no go. The menu still comes up to repair or salvage (when vehicle is locked) however when clicking on either option, the list of parts doesn't appear. It produces the same thing when the vehicle is unlocked. On a regular vehicle (non-locked) it does the samething. I also tried cen's way using the his format, however that failed to even bring up the option for repair or salvage for either lockable or non-lockable vehicles. Link to comment Share on other sites More sharing options...
0 blacksheep25 Posted February 11, 2014 Report Share Posted February 11, 2014 Gave it a shot, no go. The menu still comes up to repair or salvage (when vehicle is locked) however when clicking on either option, the list of parts doesn't appear. It produces the same thing when the vehicle is unlocked. On a regular vehicle (non-locked) it does the samething. I also tried cen's way using the his format, however that failed to even bring up the option for repair or salvage for either lockable or non-lockable vehicles. I've just given it ago on my local test server and its all working fine. When going up to a locked vehicle it will only show the repair option without having a key for it, then when its unlocked i get both the repair/salvage option. When trying it to vehicles that are spawned on the map (no key) then they work as normal and let you salvage parts. Possibly you might have a script conflicting with it but im no expert at scripting, i've just learnt from trial and error Link to comment Share on other sites More sharing options...
0 cen Posted February 11, 2014 Report Share Posted February 11, 2014 I haven't tested, but I also haven't heard any complaints from players, so I'm assuming my way still works on 1.0.4.1. Can't see a reason it wouldn't. Like blacksheep25 said, you likely have another issue in fn_selfActions.sqf that is causing it. Link to comment Share on other sites More sharing options...
0 chisel Posted February 11, 2014 Report Share Posted February 11, 2014 I have this working just fine on my 1.0.4.1 server. I rebuild my compiles and fn_selfaction files every patch using fresh files from the newest client code though. If you don't rebuild those files (and some others) with the version updates you will likely have issues with lots of stuff. Link to comment Share on other sites More sharing options...
0 Carp! Posted February 11, 2014 Report Share Posted February 11, 2014 I had to go into my init\compiles and change my directory for selfactions from fnc_usec_selfActions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf"; and change it to: fnc_usec_selfActions = compile preprocessFileLineNumbers "init\fn_selfActions.sqf"; Everything works fine now. Link to comment Share on other sites More sharing options...
0 Wooley1973 Posted May 23, 2014 Report Share Posted May 23, 2014 Thank you for this Modification! It works to 90% fine BUT i have the problem that it is not possible to salvage FUEL, ENGINE and BODY from any Vehicle (Spawn, Trader Vehicle, Lockes / Unlocked). Any Idea? Link to comment Share on other sites More sharing options...
Question
BrDnzz
Just wondering is there a script to stop people from salvaging parts off peoples vehicles in trader cities, been having alot of problems with people taking wheels off other peoples cars soon as they buy them
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now