mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 18:36:29 +03:00
0.9 + pre 1.7.5
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private["_hasFood","_item","_text","_key","_config","_sfx"];
|
||||
private["_onLadder","_item","_hasdrinkitem","_config","_text","_sfx","_id","_display"];
|
||||
disableserialization;
|
||||
call gear_ui_init;
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
@@ -10,10 +10,7 @@ if (vehicle player != player) exitWith {cutText ["You may not drink while in a v
|
||||
//if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
|
||||
|
||||
_item = _this;
|
||||
_hasdrinkitem = _this in magazines player;
|
||||
|
||||
_rndInfection = (random 15);
|
||||
_DrinkInfection = (_rndInfection < 1);
|
||||
_hasdrinkitem = _item in magazines player;
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
@@ -26,32 +23,24 @@ player removeMagazine _item;
|
||||
sleep 1;
|
||||
[player,_sfx,0,false] call dayz_zombieSpeak;
|
||||
|
||||
|
||||
if (_item == "ItemWaterbottle") then {
|
||||
if (_item == "ItemWaterbottle" or _item == "ItemWaterbottleBoiled") then {
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
if (_DrinkInfection) then {
|
||||
if ((random 15 < 1) and (_item == "ItemWaterbottle")) then {
|
||||
r_player_infected = true;
|
||||
player setVariable["USEC_infected",true];
|
||||
};
|
||||
//_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
|
||||
} else {
|
||||
player addMagazine "ItemSodaEmpty";
|
||||
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
|
||||
|
||||
/*
|
||||
_update = player getVariable["updatePlayer",[false,false,false,false,false]];
|
||||
_update set [4,true];
|
||||
player setVariable["updatePlayer",_update,true];
|
||||
*/
|
||||
|
||||
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
dayz_lastDrink = time;
|
||||
dayz_thirst = 0;
|
||||
|
||||
//Ensure Control is visible
|
||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||
_control = _display displayCtrl 1302;
|
||||
_control ctrlShow true;
|
||||
(_display displayCtrl 1302) ctrlShow true;
|
||||
|
||||
cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"];
|
||||
cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"];
|
||||
Reference in New Issue
Block a user