Add async to char select
This commit is contained in:
@@ -220,7 +220,7 @@ addNetworkHandler("ag.nextCharacter", function(client) {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function selectCharacter(client, characterId = -1) {
|
async function selectCharacter(client, characterId = -1) {
|
||||||
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
|
||||||
triggerNetworkEvent("ag.characterSelectSuccess", client);
|
triggerNetworkEvent("ag.characterSelectSuccess", client);
|
||||||
}
|
}
|
||||||
@@ -252,9 +252,13 @@ function selectCharacter(client, characterId = -1) {
|
|||||||
setPlayerHeading(client, tempSubAccount.spawnHeading);
|
setPlayerHeading(client, tempSubAccount.spawnHeading);
|
||||||
setPlayerInterior(client, tempSubAccount.interior);
|
setPlayerInterior(client, tempSubAccount.interior);
|
||||||
setPlayerVirtualWorld(client, tempSubAccount.dimension);
|
setPlayerVirtualWorld(client, tempSubAccount.dimension);
|
||||||
|
setTimeout(function() {
|
||||||
|
updatePlayerCash(client);
|
||||||
|
}, 1000);
|
||||||
}, client.ping+1000);
|
}, client.ping+1000);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
addNetworkHandler("ag.selectCharacter", selectCharacter);
|
addNetworkHandler("ag.selectCharacter", selectCharacter);
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user