SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/08/2013, 02:07 AM   #1
thefatshizms
High-roller
 
thefatshizms's Avatar
 
Join Date: Dec 2011
Location: England
Posts: 1,746
Reputation: 259
Default Bitwise - Flags not turning on.

I have this for when a player logs in:
pawn Code:
PlayerVariables[playerid] |= PLAYER_LOGGED_IN;
SendClientMessage(playerid, COLOR_GREEN, "Logged in!");

And this on onplayerrequestclass:
pawn Code:
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.
__________________
SFCNR ******* | SFCNR Forum
thefatshizms is offline   Reply With Quote
Old 04/08/2013, 02:53 AM   #2
Bakr
Gangsta
 
Join Date: Apr 2011
Posts: 975
Reputation: 198
Default Re: Bitwise - Flags not turning on.

Show where you declare PLAYER_LOGGED_IN and the others.
__________________

Looking for some people to help me with script testing. If you would be interested, send me a PM.

Quote:
Originally Posted by RiChArD_A
Bakr, what have done to you . You don't know me to be saying that I'm lazy. Your fucked ass mom is the only idiot here, ass hole.
Bakr is offline   Reply With Quote
Old 04/08/2013, 01:37 PM   #3
thefatshizms
High-roller
 
thefatshizms's Avatar
 
Join Date: Dec 2011
Location: England
Posts: 1,746
Reputation: 259
Default Re: Bitwise - Flags not turning on.

pawn Code:
enum PlayerVars:(<<=1)
{
    PLAYER_SPAWNED = 1,
    PLAYER_LOGGED_IN,
    PLAYER_IS_REGISTERED,

//and so on
}

new PlayerVars:PlayerVariables[MAX_PLAYERS];
__________________
SFCNR ******* | SFCNR Forum
thefatshizms is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Textdraw Flags - Over 30 country flags Drebin Includes 71 25/09/2016 10:29 PM
Force bitwise operation to return only 0 or 1 Misiur Scripting Help 2 19/03/2013 03:00 PM
Flags Vinninho Scripting Help 5 17/03/2013 06:45 PM
Flags Mustang GT Scripting Help 1 28/08/2011 07:03 AM
Bitwise comparation niCe Help Archive 3 31/10/2009 10:50 PM


All times are GMT. The time now is 05:24 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.