Hey guys I am sure this would be very simple, but I am not sure what the correct way of coding it would be.
I want to take this code and add a simple restriction in it. AKA....... IF 60 meters from itemplotpole THEN get no _menu1 option
Like I said it should be pretty simple to do, just not sure how to word it correctly.
//Repairing Vehicles
if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
if (s_player_repair_crtl < 0) then {
_vehicle = cursorTarget;
dayz_myCursorTarget = _vehicle;
_menu = dayz_myCursorTarget addAction ["Repair Vehicle", "salvage\repair_vehicle.sqf",_vehicle, 0, true, false, "",""];
_menu1 = dayz_myCursorTarget addAction ["Salvage Vehicle", "salvage\salvage_vehicle.sqf",_vehicle, 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;
};
};