Please help me with the register system, i'm doing it more than 2weeks....
#7

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Ok add this:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0){
        SendClientMessage(playerid, 0xFF0000AA, "ERROR: You're not logged in!");
        return 0;
    }
    return 1;
}
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])
Thank you for helping me, but this code under OnPlayerRequestSpawn isn't working, I can click on spawn and play the game if i didn't type any password...So maybe anyone else know how to do that?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)