From 8b598c843b1c61e5cb8434ec6b70b0cbd85e4cdf Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 18 Apr 2021 23:12:40 -0500 Subject: [PATCH] Use class member for spawn util --- scripts/server/native.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/server/native.js b/scripts/server/native.js index d4524178..473c1950 100644 --- a/scripts/server/native.js +++ b/scripts/server/native.js @@ -121,7 +121,7 @@ function getPlayerVehicleSeat(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) { - getPlayerCurrentSubAccount(client).cash += amount; + getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash + amount; updatePlayerCash(client); } // =========================================================================== function takePlayerCash(client, amount) { - getPlayerCurrentSubAccount(client).cash -= amount; + getPlayerCurrentSubAccount(client).cash = getPlayerCurrentSubAccount(client).cash - amount; updatePlayerCash(client); }