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; } forEach boil_tin_cans;
_hasFuelE = "ItemJerrycanEmpty" in _magazinesPlayer; _hasFuelE = "ItemJerrycanEmpty" in _magazinesPlayer;
_hasFuelBarrelE = "ItemFuelBarrelEmpty" in _magazinesPlayer; _hasFuelBarrelE = "ItemFuelBarrelEmpty" in _magazinesPlayer;
_hasHotwireKit = "ItemHotwireKit" in _magazinesPlayer;
_itemsPlayer = items player; _itemsPlayer = items player;
@@ -210,7 +211,11 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
s_player_lockunlock set [count s_player_lockunlock,_Unlock]; s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1; s_player_lockUnlock_crtl = 1;
} else { } else {
_Unlock = player addAction ["<t color='#ff0000'>Vehicle Locked</t>", "",_cursorTarget, 2, true, true, "", ""]; 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 set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1; s_player_lockUnlock_crtl = 1;
}; };
@@ -288,7 +293,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
}; };
// Study body // Study body
if (_isMan and !_isZombie) then { if (_isMan and !_isZombie and !_isAnimal) then {
_player_studybody = true; _player_studybody = true;
} }
}; };
@@ -490,7 +495,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
// inplace maintenance tool // 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_lastTarget select 1) != _cursorTarget) then {
if (s_player_maint_build > 0) then { if (s_player_maint_build > 0) then {
player removeAction s_player_maint_build; player removeAction s_player_maint_build;