GetPlayerState - Help!
#5

Quote:
Originally Posted by AntonioCroatia
Посмотреть сообщение
Sorry but, i know that and I missed code sry, look this is problem

PLAYER_STATE_SPAWNED

coz it get player state like he isn't spawned, but he clicked on button "Spawn"
If you wanna check if a player is or isn't spawned, just create a new boolean, and assign it to him, and then it'll vary whether he actually IS or isn't spawned.
pawn Код:
new bool:Spawned[MAX_PLAYERS] = false; // a boolean can only be set to "true", or "false".
public OnPlayerConnect(playerid)
{
     Spawned[playerid] = false;
     return 1;
}
public OnPlayerSpawn(playerid)
{
     Spawned[playerid] = true;
     return 1;
}
// and under the cmd check if Spawned[playerid] == true, else he isn't spawned so send him an error message.
// NOTE: Do not directly use this snippet, you must edit it to sync with your script, example:
//if he's going to a tutorial, then under OnPlayerSpawn, check if he isn't going to a tutorial, if so, assign it to true, else assign it to false or this will be pointless.
Reply


Messages In This Thread
GetPlayerState - Help! - by AntonioCroatia - 10.07.2013, 20:11
Re: GetPlayerState - Help! - by Sandiel - 10.07.2013, 20:26
Re: GetPlayerState - Help! - by AntonioCroatia - 10.07.2013, 20:35
Re: GetPlayerState - Help! - by Konstantinos - 10.07.2013, 20:38
Re: GetPlayerState - Help! - by Sandiel - 10.07.2013, 20:42
Re: GetPlayerState - Help! - by Konstantinos - 10.07.2013, 20:48
Re: GetPlayerState - Help! - by Sandiel - 10.07.2013, 21:02
Re: GetPlayerState - Help! - by Mmartin - 10.07.2013, 21:02
Re: GetPlayerState - Help! - by AntonioCroatia - 10.07.2013, 21:04
Re: GetPlayerState - Help! - by Konstantinos - 10.07.2013, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)