mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user