Don't announce job route stop on player quit
This commit is contained in:
@@ -120,7 +120,7 @@ function onPlayerQuit(event, client, quitReasonId) {
|
||||
}
|
||||
|
||||
if (isPlayerOnJobRoute(client)) {
|
||||
stopJobRoute(client);
|
||||
stopJobRoute(client, false, false);
|
||||
}
|
||||
|
||||
if (isPlayerWorking(client)) {
|
||||
@@ -136,17 +136,17 @@ function onPlayerQuit(event, client, quitReasonId) {
|
||||
clearTimeout(getPlayerData(client).loginTimeout);
|
||||
}
|
||||
|
||||
playerResourceReady[client.index] = false;
|
||||
playerResourceStarted[client.index] = false;
|
||||
playerInitialized[client.index] = false;
|
||||
playerGUIReady[client.index] = false;
|
||||
|
||||
messageDiscordEventChannel(`👋 ${getPlayerName(client)} has left the server (${reasonText})`);
|
||||
getClients().forEach(forClient => {
|
||||
let reasonText = getGroupedLocaleString(forClient, "DisconnectReasons", quitReasonId);
|
||||
messagePlayerNormal(forClient, getLocaleString(forClient, "PlayerLeftServer", getPlayerName(client), reasonText));
|
||||
});
|
||||
|
||||
playerResourceReady[client.index] = false;
|
||||
playerResourceStarted[client.index] = false;
|
||||
playerInitialized[client.index] = false;
|
||||
playerGUIReady[client.index] = false;
|
||||
|
||||
getServerData().clients[getPlayerId(client)] = null;
|
||||
}
|
||||
|
||||
@@ -394,10 +394,12 @@ function onPlayerDeath(client, killer, weapon, pedPiece) {
|
||||
|
||||
function onPedSpawn(ped) {
|
||||
if (ped.type == ELEMENT_PLAYER) {
|
||||
if (getGame() != AGRP_GAME_MAFIA_ONE && getGame() != AGRP_GAME_GTA_IV) {
|
||||
//setTimeout(onPlayerSpawn, 250, ped);
|
||||
onPlayerSpawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user