Ventana Posted March 3, 2014 Report Share Posted March 3, 2014 On my server you are able to salvage locked vehicles and even tow them. Is this normal? If not how do I change this? Link to comment Share on other sites More sharing options...
stonXer Posted March 3, 2014 Report Share Posted March 3, 2014 Not sure about the salvaging, but for towing locked vehicles I just followed this guide Link to comment Share on other sites More sharing options...
cen Posted March 3, 2014 Report Share Posted March 3, 2014 Do this in fn_selfActions.sqf: //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { 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, "",""]; 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...
Skaronator Posted March 3, 2014 Report Share Posted March 3, 2014 Do this in fn_selfActions.sqf: //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { 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, "",""]; 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; }; s_player_repairActions set [count s_player_repairActions,_menu]; s_player_repair_crtl = 1; This lines must be outside of the if (locked) check. That should be fine: http://pastebin.com/hW1Wehqy Link to comment Share on other sites More sharing options...
cen Posted March 3, 2014 Report Share Posted March 3, 2014 What do you mean Skar? Link to comment Share on other sites More sharing options...
LancerSolurus Posted March 4, 2014 Report Share Posted March 4, 2014 If you want the repair to work but not the salvage, this is straight from my script @ Skaronator the code you posted won't allow repair, the 'set' function for _menu is inside of the locked check //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then { 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,_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...
Ventana Posted March 5, 2014 Author Report Share Posted March 5, 2014 Thanks guys, I haven't set up a self actions or compiles in the mission pbo yet but will do this when I do. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now