mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Add toggleable Bury and Butcher Bodies by salival
This also re-arranges the configVariables.sqf and loads the variables for both (server and client) first. This allows to check for certain variables like Z_SingleCurrency and stops the loading of all other Z_SingleCurrency variables even when Z_SingleCurrency was not on.
This commit is contained in:
@@ -808,16 +808,41 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
|
||||
} else {
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = -1;
|
||||
};
|
||||
|
||||
if (DZE_Take_Clothes) then {
|
||||
if (_isMan && !_isAlive && !_isZombie && {!(_cursorTarget isKindOf "Animal")} && {!(_cursorTarget getVariable["clothesTaken",false])} && {_typeOfCursorTarget in AllPlayers} && {!(_typeOfCursorTarget in DZE_Disable_Take_Clothes)}) then {
|
||||
if (s_player_clothes < 0) then {
|
||||
s_player_clothes = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_TC_TAKE_CLOTHES"],"\z\addons\dayz_code\actions\takeClothes.sqf",_cursorTarget,0, false,true];
|
||||
};
|
||||
|
||||
if (!_isAlive && _isMan && !_isZombie && {!(_cursorTarget isKindOf "Animal")}) then {
|
||||
if (DZE_Take_Clothes) then {
|
||||
if (!(_cursorTarget getVariable["clothesTaken",false]) && {_typeOfCursorTarget in AllPlayers} && {!(_typeOfCursorTarget in DZE_Disable_Take_Clothes)}) then {
|
||||
if (s_player_clothes < 0) then {
|
||||
s_player_clothes = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_TC_TAKE_CLOTHES"],"\z\addons\dayz_code\actions\takeClothes.sqf",_cursorTarget,0, false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (DZE_Bury_Body) then {
|
||||
local _hasShovel = ("ItemEtool" in _itemsPlayer || "ItemShovel" in _itemsPlayer);
|
||||
if (_hasShovel && !(_cursorTarget getVariable ["bodyButchered",false])) then {
|
||||
if (s_player_bury_human < 0) then {
|
||||
s_player_bury_human = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_BA_BURY"],"\z\addons\dayz_code\actions\buryActions.sqf",[_cursorTarget,"bury"],0,false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_bury_human;
|
||||
s_player_bury_human = -1;
|
||||
};
|
||||
};
|
||||
|
||||
if (DZE_Butcher_Body) then {
|
||||
if (({_x in ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1"]} count _itemsPlayer > 0) && !(_cursorTarget getVariable ["bodyButchered",false])) then {
|
||||
if (s_player_butcher_human < 0) then {
|
||||
s_player_butcher_human = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_BA_BUTCHER"],"\z\addons\dayz_code\actions\buryActions.sqf",[_cursorTarget,"butcher"],0,false,true];
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_butcher_human;
|
||||
s_player_butcher_human = -1;
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1095,6 +1120,10 @@ if (!isNull _cursorTarget && {!_inVehicle && !_isPZombie && _canDo && player dis
|
||||
s_player_checkWallet = -1;
|
||||
player removeAction s_player_clothes;
|
||||
s_player_clothes = -1;
|
||||
player removeAction s_player_bury_human;
|
||||
s_player_bury_human = -1;
|
||||
player removeAction s_player_butcher_human;
|
||||
s_player_butcher_human = -1;
|
||||
};
|
||||
|
||||
//Dog actions on player self
|
||||
|
||||
@@ -11,7 +11,7 @@ local _cantSee = false;
|
||||
|
||||
{
|
||||
local _isZombie = _x isKindOf "zZombie_base";
|
||||
local _isMutant = typeOf _x == "z_bloodsucker";
|
||||
local _isMutant = (DZE_Bloodsuckers && {typeOf _x == "z_bloodsucker"});
|
||||
local _forcedSpeed = if ((_speedMin != _speedMax) && {(_speedMin > 0) && (_speedMax > 0)}) then {((random (DZE_ZombieSpeed select 1)) max (DZE_ZombieSpeed select 0));} else {getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "forcedSpeed");};
|
||||
local _dist = _x distance _refObj;
|
||||
local _chance = 1; //0 / dayz_monitorPeriod; // Z verbosity
|
||||
@@ -131,7 +131,7 @@ local _cantSee = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (_isMutant && DZE_BloodsuckerDeleteNearTrader && isInTraderCity) then {deleteVehicle _x}; // Delete bloodsucker if the player is in a trader city
|
||||
if (_isMutant && {DZE_BloodsuckerDeleteNearTrader && isInTraderCity}) then {deleteVehicle _x}; // Delete bloodsucker if the player is in a trader city
|
||||
} forEach ((getPosATL _refObj) nearEntities ["Zed_Base",100]);
|
||||
|
||||
if (_attacked) then {
|
||||
|
||||
Reference in New Issue
Block a user