Immediately call spawn event
This commit is contained in:
@@ -519,6 +519,7 @@ function selectCharacter(client, characterId = -1) {
|
|||||||
|
|
||||||
if (getGame() <= AGRP_GAME_GTA_SA) {
|
if (getGame() <= AGRP_GAME_GTA_SA) {
|
||||||
spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
||||||
|
onPlayerSpawn(client);
|
||||||
} else if (getGame() == AGRP_GAME_GTA_IV) {
|
} else if (getGame() == AGRP_GAME_GTA_IV) {
|
||||||
//spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
//spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension);
|
||||||
clearPlayerWeapons(client);
|
clearPlayerWeapons(client);
|
||||||
@@ -536,10 +537,7 @@ function selectCharacter(client, characterId = -1) {
|
|||||||
//spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]);
|
//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]})`);
|
//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]);
|
spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]);
|
||||||
setTimeout(function () {
|
onPlayerSpawn(client);
|
||||||
onPlayerSpawn(client);
|
|
||||||
//stopRadioStreamForPlayer(client);
|
|
||||||
}, 250);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
removePlayerKeyBind(client, getKeyIdFromParams("insert"));
|
removePlayerKeyBind(client, getKeyIdFromParams("insert"));
|
||||||
|
|||||||
Reference in New Issue
Block a user