Update check wallet for zombies

Check wallet on zombies will only be displayed if zombie coins are activated.
This commit is contained in:
AirwavesMan
2020-10-29 14:56:52 +01:00
parent ff94503aab
commit 5afd6fd37d

View File

@@ -28,6 +28,7 @@ _canPickLight = false;
_myCharID = player getVariable ["CharacterID","0"]; _myCharID = player getVariable ["CharacterID","0"];
_vehicleOwnerID = _vehicle getVariable ["CharacterID","0"]; _vehicleOwnerID = _vehicle getVariable ["CharacterID","0"];
_hasHotwireKit = "ItemHotwireKit" in _magazinesPlayer; _hasHotwireKit = "ItemHotwireKit" in _magazinesPlayer;
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isPZombie = player isKindOf "PZombie_VB"; _isPZombie = player isKindOf "PZombie_VB";
_isClose = (player distance _cursorTarget < 3); _isClose = (player distance _cursorTarget < 3);
_dogHandle = player getVariable ["dogID",0]; _dogHandle = player getVariable ["dogID",0];
@@ -186,10 +187,9 @@ if (_isPZombie) then {
s_player_pzombiesvision = player addAction [localize "STR_EPOCH_ACTIONS_NIGHTVIS", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"]; s_player_pzombiesvision = player addAction [localize "STR_EPOCH_ACTIONS_NIGHTVIS", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"];
}; };
if (!isNull _cursorTarget && _isClose) then { if (!isNull _cursorTarget && _isClose) then {
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isHarvested = _cursorTarget getVariable["meatHarvested",false]; _isHarvested = _cursorTarget getVariable["meatHarvested",false];
_isMan = _cursorTarget isKindOf "Man"; //includes animals and zombies _isMan = _cursorTarget isKindOf "Man"; //includes animals and zombies
if (!alive _cursorTarget && {_isMan} && {!_isZombie} && {!_isHarvested}) then { if (!alive _cursorTarget && _isMan && !_isZombie && !_isHarvested) then {
if (s_player_pzombiesfeed < 0) then { if (s_player_pzombiesfeed < 0) then {
s_player_pzombiesfeed = player addAction [localize "STR_EPOCH_ACTIONS_FEED", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",_cursorTarget, 3, true, false]; s_player_pzombiesfeed = player addAction [localize "STR_EPOCH_ACTIONS_FEED", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",_cursorTarget, 3, true, false];
}; };
@@ -814,7 +814,7 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
// ZSC // ZSC
if (Z_singleCurrency) then { if (Z_singleCurrency) then {
if (_isMan && !_isAlive && {!(_cursorTarget isKindOf "Animal")}) then { if (_isMan && !_isAlive && {(!(_cursorTarget isKindOf "Animal") && !_isZombie) || (_isZombie && ZSC_ZombieCoins select 0)}) then {
if (s_player_checkWallet < 0) then { if (s_player_checkWallet < 0) then {
s_player_checkWallet = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_ZSC_CHECK_WALLET"],"\z\addons\dayz_code\actions\zsc\checkWallet.sqf",_cursorTarget,0,false,true]; s_player_checkWallet = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_ZSC_CHECK_WALLET"],"\z\addons\dayz_code\actions\zsc\checkWallet.sqf",_cursorTarget,0,false,true];
}; };