Bitwise - Flags not turning on.
#1

I have this for when a player logs in:
pawn Код:
PlayerVariables[playerid] |= PLAYER_LOGGED_IN;
SendClientMessage(playerid, COLOR_GREEN, "Logged in!");
And this on onplayerrequestclass:
pawn Код:
if(!(PlayerVariables[playerid] & PLAYER_LOGGED_IN)) {
        new Query[100];
        format(Query, 100, "SELECT `username` FROM `users` WHERE `username`='%s'", PlayerName(playerid));
        mysql_function_query(Gconnection, Query, true, "OnPlayerRequestLoginRegister", "d", playerid);

    }
Which gives you the dialog etc.

I login, get the message "Logged in!", yet it then displays the dialog again while going through skins.
Reply
#2

Show where you declare PLAYER_LOGGED_IN and the others.
Reply
#3

pawn Код:
enum PlayerVars:(<<=1)
{
    PLAYER_SPAWNED = 1,
    PLAYER_LOGGED_IN,
    PLAYER_IS_REGISTERED,

//and so on
}

new PlayerVars:PlayerVariables[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)