mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
More fnc_alertZombies updates
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
private ["_isFuelTruck","_fuelTruckCapacity","_finished","_newFuel","_abort","_newFuelSrc","_canSize","_vehicle","_configVeh","_capacity","_nameText","_fuelTruck","_findNearestVehicle"];
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_isFuelTruck","_fuelTruckCapacity","_finished","_newFuel","_abort","_newFuelSrc","_canSize","_vehicle","_configVeh","_capacity","_nameText","_fuelTruck","_findNearestVehicle"];
|
||||
|
||||
_fuelTruck = _this select 3;
|
||||
_abort = false;
|
||||
|
||||
@@ -33,9 +34,9 @@ if (count _findNearestVehicle >= 1) then {
|
||||
while {true} do {
|
||||
// qty to add per loop
|
||||
_canSize = (_capacity / 10);
|
||||
|
||||
|
||||
format[localize "str_epoch_player_131",_nameText] call dayz_rollingMessages;
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
[player,(getPosATL player),20,"refuel"] spawn fnc_alertZombies;
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
|
||||
if (!_finished) then {
|
||||
@@ -58,7 +59,6 @@ if (count _findNearestVehicle >= 1) then {
|
||||
PVDZ_send = [_vehicle,"SetFuel",[_vehicle,_newFuel]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
};
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
format[localize "str_epoch_player_132",_nameText,round(_newFuel*100)] call dayz_rollingMessages;
|
||||
} else {
|
||||
_abort = true;
|
||||
@@ -66,14 +66,13 @@ if (count _findNearestVehicle >= 1) then {
|
||||
} else {
|
||||
//Filling near vehicle at gas station with generator
|
||||
if (_newFuel >= _capacity) then {_newFuel = 1; _abort = true;} else {_newFuel = (_newFuel / _capacity);};
|
||||
|
||||
|
||||
if (local _vehicle) then {
|
||||
[_vehicle,_newFuel] call local_setFuel;
|
||||
} else {
|
||||
PVDZ_send = [_vehicle,"SetFuel",[_vehicle,_newFuel]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
};
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
format[localize "str_epoch_player_132",_nameText,round(_newFuel*100)] call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
@@ -81,7 +80,7 @@ if (count _findNearestVehicle >= 1) then {
|
||||
if (_abort) exitWith {
|
||||
["Working",0,[0,1,3,0]] call dayz_NutritionSystem;
|
||||
};
|
||||
uiSleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
} else {
|
||||
localize "str_epoch_player_27" call dayz_rollingMessages;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed","_hasCrowbar","_finished"];
|
||||
|
||||
_vehicle = _this select 3;
|
||||
@@ -5,27 +8,23 @@ _hasToolbox = "ItemToolbox" in items player;
|
||||
_hasCrowbar = "ItemCrowbar" in items player;
|
||||
_hasCarBomb = "ItemCarBomb" in magazines player;
|
||||
_alreadyBombed = _vehicle getVariable["hasBomb",false];
|
||||
|
||||
if(!_hasToolbox or !_hasCrowbar) exitWith {
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_bombToolMissing" call dayz_rollingMessages;
|
||||
};
|
||||
if(!_hasCarBomb) exitWith {
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_bombMissing" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
/*
|
||||
if(_vehicle getVariable["hasBomb",false]) exitWith {
|
||||
localize "str_bombAlready" call dayz_rollingMessages;
|
||||
};
|
||||
*/
|
||||
|
||||
//DO Animation
|
||||
_dis=20;
|
||||
_sfx = "tentunpack";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
[player,(getPosATL player),20,"tentunpack"] spawn fnc_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished or !("ItemCarBomb" in magazines player)) exitWith {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_emptycan","_objectID","_objectUID","_obj","_fuelArray","_matchArray","_randomJerryCan","_fireIntensity","_dis","_sfx","_finished"];
|
||||
private ["_emptycan","_objectID","_objectUID","_obj","_fuelArray","_matchArray","_randomJerryCan","_fireIntensity","_finished"];
|
||||
|
||||
//Tent Object
|
||||
_obj = _this select 3;
|
||||
@@ -34,10 +34,7 @@ if ((count _matchArray == 0)) exitwith { dayz_actionInProgress = false; systemCh
|
||||
player removeAction s_player_destroytent;
|
||||
s_player_destroytent = -1;
|
||||
|
||||
_dis=20;
|
||||
_sfx = "tentpack";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
[player,(getPosATL player),20,"tentpack"] spawn fnc_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished or (isNull _obj)) exitWith {
|
||||
|
||||
@@ -79,9 +79,6 @@ _nameText = getText(_configVeh >> "displayName");
|
||||
publicVariableServer "PVDZ_send";
|
||||
};
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
player addMagazine _canName;
|
||||
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
|
||||
@@ -79,8 +79,7 @@ if (_drinking) then {
|
||||
foreach magazines player;
|
||||
|
||||
if (_filled > 0) then {
|
||||
[player, "fillwater", 0, false, 5] call dayz_zombieSpeak;
|
||||
[player, 5, true, _posATL] call player_alertZombies;
|
||||
[player,(getPosATL player),5,"fillwater"] spawn fnc_alertZombies;
|
||||
format [localize "str_player_01", _filled] call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "str_player_02" call dayz_rollingMessages;
|
||||
|
||||
@@ -55,8 +55,7 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
|
||||
PVDZE_handleSafeGear = [player,_obj,3,dayz_combination,dayz_authKey];
|
||||
publicVariableServer "PVDZE_handleSafeGear";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,25,true,(getPosATL player)] spawn player_alertZombies;
|
||||
[player,(getPosATL player),40,"repair"] spawn fnc_alertZombies;
|
||||
|
||||
if (DZE_lockablesHarderPenalty) then {
|
||||
dayz_lastCodeFail = (diag_tickTime + dayz_UnlockTime);
|
||||
|
||||
Reference in New Issue
Block a user