Convert cash give/take amounts to int
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user