Group sounds and zombie calls

dayz_zombieSpeak and player_alertZombies are called often together or should be. fnc_alertZombies groups them together and uses the given parameters. This streamlines and corrects the missing or incorrect calls from dayz_zombieSpeak or player_alertZombies.
This commit is contained in:
AirwavesMan
2020-09-12 01:30:45 +02:00
parent a456c948f5
commit 9ad86a84a3
35 changed files with 193 additions and 205 deletions

View File

@@ -1,14 +1,17 @@
/*
Player action for emptying containers e.g. water bottle
Single parameter:
string item classname
Author:
Foxy
*/
private ["_cfg","_nutrition","_bloodRegen","_infectionChance","_sound","_output"];
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
dayz_actionInProgress = true;
private "_cfg";
_cfg = (ConfigFile >> "CfgMagazines" >> _this);
@@ -33,6 +36,9 @@ if ((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState p
//player doesn't have the consumable item
if (!(_this in magazines player)) exitWith { localize "str_misplaced_container" call dayz_rollingMessages; };
[player,(getPosATL player),5,"refuel"] spawn fnc_alertZombies;
player playActionNow "PutDown";
//Remove container
player removeMagazine _this;
player addMagazine getText (_cfg >> "containerEmpty");
@@ -45,4 +51,6 @@ if (vehicle player == player) then
else
{
(findDisplay 106) closeDisplay 0;
};
};
dayz_actionInProgress = false;