Convert cash give/take amounts to int
This commit is contained in:
@@ -211,21 +211,21 @@ function getPlayerArmour(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = amount;
|
||||
getPlayerCurrentSubAccount(client).cash = toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function givePlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + amount;
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function takePlayerCash(client, amount) {
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - amount;
|
||||
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user