06.11.2010, 14:45
Ok add this:
And a tip about the'new logged[MAX_PLAYERS]; (or something like that)
Make it a 'bool' -> new bool:logged[MAX_PLAYERS];
And then logged[playerid] = 0; is now logged[playerid] = false;, and logged[playerid] = 1; is then logged[playerid] = true;
Then you can check if a player is logged on this way: if(logged[playerid]) instead of if(logged[playerid] == 1)
And ps, if(logged[playerid] == 0) is then if(!logged[playerid])
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(logged[playerid] == 0){
SendClientMessage(playerid, 0xFF0000AA, "ERROR: You're not logged in!");
return 0;
}
return 1;
}
Make it a 'bool' -> new bool:logged[MAX_PLAYERS];
And then logged[playerid] = 0; is now logged[playerid] = false;, and logged[playerid] = 1; is then logged[playerid] = true;
Then you can check if a player is logged on this way: if(logged[playerid]) instead of if(logged[playerid] == 1)
And ps, if(logged[playerid] == 0) is then if(!logged[playerid])