From 4b171cb63646660f6a33ba9f48d5fe1094794967 Mon Sep 17 00:00:00 2001 From: AirwavesMan Date: Thu, 15 Apr 2021 20:56:53 +0200 Subject: [PATCH] Fix possible weapon dupe Thx to mmrsz --- SQF/dayz_code/compile/player_forceSave.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/compile/player_forceSave.sqf b/SQF/dayz_code/compile/player_forceSave.sqf index 8259f8ba5..15ce83c8c 100644 --- a/SQF/dayz_code/compile/player_forceSave.sqf +++ b/SQF/dayz_code/compile/player_forceSave.sqf @@ -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];