mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
add friendly database persistence
This commit is contained in:
@@ -624,6 +624,11 @@ if(!isDedicated) then {
|
||||
if(isNil "DZE_ForceNameTagsOff") then {
|
||||
DZE_ForceNameTagsOff = false;
|
||||
};
|
||||
if(isNil "DZE_FriendlySaving") then {
|
||||
DZE_FriendlySaving = true;
|
||||
};
|
||||
|
||||
DZE_Friends = [];
|
||||
|
||||
DZE_CanPickup = true;
|
||||
DZE_Q = false;
|
||||
|
||||
@@ -1085,7 +1085,10 @@ class FSM
|
||||
" //Reload players state" \n
|
||||
" if (count _state > 2) then {" \n
|
||||
" dayz_temperatur = _state select 2;" \n
|
||||
" };" \n
|
||||
" }; " \n
|
||||
" if ((count _state > 3) and DZE_FriendlySaving) then {" \n
|
||||
" DZE_Friends = _state select 3;" \n
|
||||
" }; " \n
|
||||
"} else {" \n
|
||||
" _currentWpn = ""Makarov"";" \n
|
||||
" _currentAnim = ""aidlpercmstpsraswpstdnon_player_idlesteady02"";" \n
|
||||
|
||||
@@ -15,6 +15,7 @@ _maxDistancePlayer = DZE_teleport select 3;
|
||||
_maxDistanceVehicle = DZE_teleport select 4;
|
||||
|
||||
player setVariable ["temperature",dayz_temperatur,true];
|
||||
player setVariable ["friendlyTo",DZE_Friends,true];
|
||||
|
||||
dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns)) + (((count dayz_myMagazines) * 0.1) + (count dayz_myWeapons * 0.5));
|
||||
|
||||
|
||||
@@ -165,6 +165,9 @@ if (_characterID != "0") then {
|
||||
};
|
||||
_temp = round(_character getVariable ["temperature",100]);
|
||||
_currentState = [_currentWpn,_currentAnim,_temp];
|
||||
if(DZE_FriendlySaving) then {
|
||||
_currentState set [(count _currentState),(_character getVariable ["friendlyTo",[]])];
|
||||
};
|
||||
/*
|
||||
Everything is ready, now publish to HIVE
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user