Raised This Month: $ Target: $400
 0% 

set_user_flags()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 01-02-2012 , 09:08   set_user_flags()
Reply With Quote #1

How exactly does this work? If I have let's say flags 'ab' and use:
PHP Code:
set_user_flagsidread_flags"bc" ) ) 
Will my flags be 'abc' in the end, or will it overwrite the current flags by 'bc'?

I've read somewhere that I have to use

PHP Code:
set_user_flagsid)
set_user_flagsidread_flags"bc" ) ) 
to overwrite current flags, but I couldn't for god's sake find the thread anywhere, so I'm starting a new one.


Edit: I don't want to create another thread as this is quite a similiar question. Would regular if( get_user_flags( id ) & read_flags( "ab" ) ) work? Again, I've read somewhere that there were some another checks and things, but the flags were used by constants and I don't know if it works any different this way.

Thanks for answers, I'm sorry for not testing this out myself but currently I'm out of server access and don't havetime for downloading and configuring HLDS atm...

Last edited by Backstabnoob; 01-02-2012 at 09:11.
Backstabnoob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-02-2012 , 09:19   Re: set_user_flags()
Reply With Quote #2

set_user_flags -adds- flags. If you have "a", it will be "abc".
__________________
Arkshine is offline
Old 01-02-2012, 09:23
Backstabnoob
This message has been deleted by Backstabnoob. Reason: nvm
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 01-02-2012 , 09:26   Re: set_user_flags()
Reply With Quote #3

Thank you. And what about the get_user_flags question?
Backstabnoob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-02-2012 , 09:28   Re: set_user_flags()
Reply With Quote #4

It should, but why you don't use directly the constants ?
__________________
Arkshine is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 01-02-2012 , 09:51   Re: set_user_flags()
Reply With Quote #5

Because I want the users to set whichever flags they want via mysql table, thus it's a whole flag string.

Will try it once I get server access, thank you again.
Backstabnoob is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 03:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode