Currency
Currency related commands for individual players.
All currency related functionality for managing cash and bank values.
Accessible on Server Side
Currency Types
Currency currently comes in two types. There is bank
and cash
.
Cash is a value that can be considered on-hand
while bank
is money stored in a 'safe' location. They're effectively the same but it's dependent on you to decide how to use them and the rules behind each currency type.
Set Currency
This is pretty much just for administrative related things. Currency can bet set to an exact value.
Adding Currency
Cash
Bank
Removing Currency
Cash
Bank
Remove All Currency Types
There is sometimes a situation where you wan to remove both cash on-hand and bank currency at the same time. That is what subAllCurrencies
is for.
The function below will remove all currencies and start with cash
first.
As a general example. Imagine the player has the following:
100 Cash
100 Bank
Together than is 200.
If the cost of an item is 150; you can use subAllCurrencies to subtract 100 from cash
and 50 from bank
. Leaving 50
remaining in the player's overall currency stats.
Example
Last updated