Convert cash give/take amounts to int

This commit is contained in:
Vortrex
2021-04-28 21:28:24 -05:00
parent d25ac70b77
commit 4c368d6774

View File

@@ -211,21 +211,21 @@ function getPlayerArmour(client) {
// =========================================================================== // ===========================================================================
function setPlayerCash(client, amount) { function setPlayerCash(client, amount) {
getPlayerCurrentSubAccount(client).cash = amount; getPlayerCurrentSubAccount(client).cash = toInteger(amount);
updatePlayerCash(client); updatePlayerCash(client);
} }
// =========================================================================== // ===========================================================================
function givePlayerCash(client, amount) { function givePlayerCash(client, amount) {
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + amount; getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + toInteger(amount);
updatePlayerCash(client); updatePlayerCash(client);
} }
// =========================================================================== // ===========================================================================
function takePlayerCash(client, amount) { function takePlayerCash(client, amount) {
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - amount; getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - toInteger(amount);
updatePlayerCash(client); updatePlayerCash(client);
} }