From fa78c3a4cc9f8d7ea8bfff63b57804b5164cfb46 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Wed, 29 Jul 2020 15:22:20 -0500 Subject: [PATCH] Update z_at_buyItems.sqf --- .../actions/AdvancedTrading/functions/z_at_buyItems.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf index bf00d5c6c..a8791466d 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_buyItems.sqf @@ -96,7 +96,7 @@ if (Z_SingleCurrency) then { _canBuy = [_weaponsToBuy,[_pistolMagsToBuy,_regularMagsToBuy],_backpacksToBuy,_toolsToBuy,_sidearmToBuy,_primaryToBuy,_vehiclesToBuy,_toolClasses,_toolAmounts] call Z_allowBuying; if (!_canBuy) exitWith {}; // Keep systemChat reasons for failure in Z_allowBuying for sanity -_wealth = player getVariable[Z_MoneyVariable,0]; +_wealth = player getVariable[(["cashMoney","globalMoney"] select Z_persistentMoney),0]; _enoughMoney = false; @@ -255,7 +255,7 @@ if (_enoughMoney) then { if (_success) then { if (Z_SingleCurrency) then { - player setVariable[Z_MoneyVariable,(_wealth - _priceToBuy),true]; + player setVariable[(["cashMoney","globalMoney"] select Z_persistentMoney),(_wealth - _priceToBuy),true]; systemChat format[localize "STR_EPOCH_TRADE_SUCCESS_COINS",[_priceToBuy] call BIS_fnc_numberText,CurrencyName]; } else { _tCost = "";