From b7de1e054a6c6021a878b5f010bc9e688d4962e8 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Tue, 20 Sep 2022 03:31:49 -0500 Subject: [PATCH] Immediately call spawn event --- scripts/server/subaccount.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js index 82e02619..b5298bdb 100644 --- a/scripts/server/subaccount.js +++ b/scripts/server/subaccount.js @@ -519,6 +519,7 @@ function selectCharacter(client, characterId = -1) { if (getGame() <= AGRP_GAME_GTA_SA) { spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension); + onPlayerSpawn(client); } else if (getGame() == AGRP_GAME_GTA_IV) { //spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension); clearPlayerWeapons(client); @@ -536,10 +537,7 @@ function selectCharacter(client, characterId = -1) { //spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]); //logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as ${getGameConfig().skins[getGame()][skin][1]} (${getGameConfig().skins[getGame()][skin][0]})`); spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]); - setTimeout(function () { - onPlayerSpawn(client); - //stopRadioStreamForPlayer(client); - }, 250); + onPlayerSpawn(client); } removePlayerKeyBind(client, getKeyIdFromParams("insert"));