Skip to content

addFunds

McDiod edited this page Sep 8, 2020 · 5 revisions

grad_moneymenu_fnc_addFunds

Adds funds to or detracts funds from a unit. Effect is global.

Syntax

[unit, amount, addToBankAccount] call grad_moneymenu_fnc_addFunds

Parameter Explanation
unit Object - The unit or storage object to add or detract from.
amount Number - The Amount to add. Negative value to subtract. Total funds will never go below 0.
addToBankAccount (optional) Bool - Use true to add the amount to the unit's bank account instead of his wallet.

Example

[this, -2000] call grad_moneymenu_fnc_addFunds;
[storageBox, 100] call grad_moneymenu_fnc_addFunds;
[player, 1500, true] call grad_moneymenu_fnc_addFunds;