mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Add new combat function
This commit is contained in:
12
SQF/dayz_code/compile/fn_setCombat.sqf
Normal file
12
SQF/dayz_code/compile/fn_setCombat.sqf
Normal file
@@ -0,0 +1,12 @@
|
||||
local _object = _this select 0;
|
||||
local _setCombatOverTime = _this select 1;
|
||||
|
||||
if (_setCombatOverTime) then {
|
||||
_object setVariable["combattimeout", diag_tickTime + DZE_CombatTimer];
|
||||
} else {
|
||||
_object setVariable["startcombattimer", 1];
|
||||
};
|
||||
|
||||
if !(_object getVariable ["inCombat",false]) then {
|
||||
_object setVariable ["inCombat",true,true];
|
||||
};
|
||||
Reference in New Issue
Block a user