Fix possible weapon dupe

Thx to mmrsz
This commit is contained in:
AirwavesMan
2021-04-15 20:56:53 +02:00
parent a4ce61ea4b
commit 4b171cb636

View File

@@ -4,12 +4,14 @@ Opens player inventory to save
*/
_magazineArray = [] call player_countMagazines;
local _magazineArray = [] call player_countMagazines;
if ((count _magazineArray) > 0) then {
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
publicVariableServer "PVDZ_plr_Save";
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
} else {
PVDZ_plr_Save = [player,nil,dayz_onBack,weapons player];
};
publicVariableServer "PVDZ_plr_Save";
//diag_log format["Player_forceSave with magazines: %1",_magazineArray];