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