added hotwire action

and disallow maintain option if no dmg to wall.
This commit is contained in:
[VB]AWOL
2013-09-26 11:10:38 -05:00
parent 58e5421ac4
commit 64e5857e92

View File

@@ -102,6 +102,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
} forEach boil_tin_cans;
_hasFuelE = "ItemJerrycanEmpty" in _magazinesPlayer;
_hasFuelBarrelE = "ItemFuelBarrelEmpty" in _magazinesPlayer;
_hasHotwireKit = "ItemHotwireKit" in _magazinesPlayer;
_itemsPlayer = items player;
@@ -209,8 +210,12 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
_Unlock = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",_cursorTarget, 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
} else {
if(_hasHotwireKit) then {
_Unlock = player addAction [format["Hotwire %1",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true, "", ""];
} else {
_Unlock = player addAction ["<t color='#ff0000'>Vehicle Locked</t>", "",_cursorTarget, 2, true, true, "", ""];
};
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
};
@@ -288,7 +293,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
// Study body
if (_isMan and !_isZombie) then {
if (_isMan and !_isZombie and !_isAnimal) then {
_player_studybody = true;
}
};
@@ -490,7 +495,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
// inplace maintenance tool
if((_isDestructable or _cursorTarget isKindOf "ModularItems" or _cursorTarget isKindOf "DZE_Housebase")) then {
if((_isDestructable or _cursorTarget isKindOf "ModularItems" or _cursorTarget isKindOf "DZE_Housebase") and (damage _cursorTarget > 0.5)) then {
if ((s_player_lastTarget select 1) != _cursorTarget) then {
if (s_player_maint_build > 0) then {
player removeAction s_player_maint_build;