199918hao 1 Posted July 28, 2018 params [ ["_unit", objNull, [objNull]], ["_funds", 0, [0]] ]; if (!local _unit) exitWith { [_unit, _funds] remoteExec ["HALs_money_fnc_addFunds", _unit, false]; }; if (_funds < 0) then { _funds = ceil _funds; } else { _funds = floor _funds; }; if (_funds isEqualTo 0) exitWith {}; // Remove money if (_funds < 0) then { for "_i" from 1 to (abs _funds) do { _unit removeItem "rvg_money"; }; } else { _unit addMagazines ["rvg_money", _funds]; }; So after I use these codes, the balance will not decrease after purchasing, and there is no change. Why? The "rvg_money" is item of money. 1 Share this post Link to post Share on other sites
Schatten 287 Posted July 28, 2018 If you use addMagazines then rvg_money is magazine, right? If so then use removeMagazine. 2 Share this post Link to post Share on other sites
HallyG 239 Posted July 28, 2018 Try removeMagazine like Schatten suggested. Also I don’t think it was entirely necessary to create a new thread when you have already posted a few times in the original thread. 1 Share this post Link to post Share on other sites
HazJ 1289 Posted July 28, 2018 As mentioned above. If it is a magazine then use removeMagazine and if item then use removeItem as you did. Is it a variable? rvg_money = 100; // start balance rvg_money = rvg_money - 50; // 50 cost of item Share this post Link to post Share on other sites