18.04.2009, 02:16
It does return 7 after you have died and gone back to class selection but when you connect it is 0 because the state is set when the player spawns.
You could get around it with something like this:
You could get around it with something like this:
Код:
new bool:gstate[MAX_PLAYERS]; public OnPlayerConnect(playerid) { gstate[playerid] = false; } public OnPlayerRequestClass(playerid) { gstate[playerid] = true; } public OnPlayerSpawn(playerid) { gstate[playerid] = false; }
Код:
GetPlayerState2(playerid) return !gstate[playerid] ? GetPlayerState(playerid) : 7;