mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 21:29:59 +03:00
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.
This commit is contained in:
@@ -135,6 +135,7 @@ if (Z_SellingFrom == 2) then {
|
||||
if (_type == "trade_weapons") then {_name = configFile >> "CfgWeapons" >> _name;};
|
||||
if (_x select 0 == dayz_onBack) then {
|
||||
dayz_onBack = ""; // Remove from back
|
||||
player setVariable ["dayz_onBack",dayz_onBack,true];
|
||||
_localResult = 1;
|
||||
} else {
|
||||
_localResult = [player,_name,1] call BIS_fnc_invRemove; // Use config for BIS_fnc_invRemove
|
||||
|
||||
Reference in New Issue
Block a user