Use class member for spawn util
This commit is contained in:
@@ -121,7 +121,7 @@ function getPlayerVehicleSeat(client) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isPlayerSpawned(client) {
|
function isPlayerSpawned(client) {
|
||||||
return client.player.isType(ELEMENT_PLAYER);
|
return getPlayerData(client).spawned;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -222,14 +222,14 @@ function setPlayerCash(client, amount) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function givePlayerCash(client, amount) {
|
function givePlayerCash(client, amount) {
|
||||||
getPlayerCurrentSubAccount(client).cash += amount;
|
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + amount;
|
||||||
updatePlayerCash(client);
|
updatePlayerCash(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function takePlayerCash(client, amount) {
|
function takePlayerCash(client, amount) {
|
||||||
getPlayerCurrentSubAccount(client).cash -= amount;
|
getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - amount;
|
||||||
updatePlayerCash(client);
|
updatePlayerCash(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user