Removal of camo nets with right click on toolbox.

This commit is contained in:
[VB]AWOL
2013-10-23 00:53:41 -05:00
parent 13d825778a
commit 7d95e05d77
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
private ["_nearNets","_nearNet"];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
_nearNets = nearestObjects [player, ["DesertLargeCamoNet", "ForestCamoNet_DZ","DesertLargeCamoNet_DZ", "ForestLargeCamoNet_DZ"], 10];
_nearNet = _nearNets select 0;
if (!isNull _nearNet and _canDo) then {
[0,1,2,_nearNet] spawn player_removeObject;
} else {
cutText ["No camo nets found nearby.", "PLAIN DOWN"];
};