Add check spawn util
This commit is contained in:
@@ -306,4 +306,24 @@ function playerChangeAFKState(client, afkState) {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function checkPlayerSpawning() {
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(!isConsole(clients[i])) {
|
||||
if(getPlayerData(clients[i])) {
|
||||
if(getPlayerData(clients[i]).loggedIn) {
|
||||
if(getPlayerData(clients[i]).ped == null) {
|
||||
if(clients[i].player != null) {
|
||||
getPlayerData(clients[i]).ped = clients[i].player;
|
||||
onPlayerSpawn(clients[i].player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user