Fix storage coins bug

This commit is contained in:
A Man
2021-05-14 16:00:36 +02:00
parent 4e70a7d4cc
commit fd2214c7a4
3 changed files with 20 additions and 12 deletions

View File

@@ -48,7 +48,7 @@ server_obj_inv = {
_key = format["CHILD:303:%1:",_objectID] + str _inventory + ":";
};
if (Z_SingleCurrency) then {
if (Z_SingleCurrency && {(_class in DZE_MoneyStorageClasses) || {ZSC_VehicleMoneyStorage && (_object isKindOf "AllVehicles") && !(_object isKindOf "StaticWeapon")}}) then {
local _coins = _object getVariable ["cashMoney", -1]; //set to invalid value if getVariable fails to prevent overwriting of coins in DB
_key = _key + str _coins + ":";
};