Files
DayZ-Epoch/SQF/dayz_code/compile/player_forceSave.sqf
A Man 9852778ba9 Fix weapon dupe with server_playerSync
This reverts all the last changes to server_playerSync and creates a new global variable for dayz_onBack. This should be the best way to save the gear correct and still get dayz_onBack if the player leaves the server. This change removes the constant sending of the whole player inventory over the network from force or regluar_save. It should no longer be needed since the server does the counting now.
2021-08-19 16:46:06 +02:00

17 lines
582 B
Plaintext

/*
Opens player inventory to save
Do not use this in constant running loops or actions. force_Save opens the inventory with a dialog call.
That will interrupt actions like shooting. For loops use player_regularSave but keep in mind player_regularSave does not save the ammo count.
*/
local _magazineArray = [] call player_countMagazines;
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray}];
publicVariableServer "PVDZ_plr_Save";
//diag_log format["Player_forceSave with magazines: %1",_magazineArray];
dayz_lastSave = diag_tickTime;