GetPlayerState Returning 0 While At Class Selection
#3

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:

Код:
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;
Reply


Messages In This Thread
GetPlayerState Returning 0 While At Class Selection - by 1337pr0 - 18.04.2009, 01:49
Re: GetPlayerState Returning 0 While At Class Selection - by Joe Staff - 18.04.2009, 02:06
Re: GetPlayerState Returning 0 While At Class Selection - by BeckzyBoi - 18.04.2009, 02:16
Re: GetPlayerState Returning 0 While At Class Selection - by 1337pr0 - 18.04.2009, 02:45

Forum Jump:


Users browsing this thread: 1 Guest(s)