Raised This Month: $ Target: $400
 0% 

get_user_flags question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 01-16-2014 , 06:23   Re: get_user_flags question
Reply With Quote #1

Did you know that in structure (1 << K), K might be from 0 to 31? If you don't want more than 32 characters, then a numerical variable is enough.

In case you have more than 32 characters, you should do something like this:

new Flags[33][128];
new Client = GetRandomClient(); // an example.
formatex(Flags[Client], charsmax(Flags[]), "%s", "abcdefghijklmnopqrstu1234567890-=\[];',./_+|{}:^"<>?`~!@#$%^^&*()"); // note that ^" means " and ^^ means ^ for real, in a string.
if (containi(Flags[Client], "#") != -1) { // client got # flag. }
__________________

Last edited by claudiuhks; 01-16-2014 at 06:34.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-16-2014 , 14:39   Re: get_user_flags question
Reply With Quote #2

Quote:
Originally Posted by claudiuhks View Post
Did you know that in structure (1 << K), K might be from 0 to 31? If you don't want more than 32 characters, then a numerical variable is enough.

In case you have more than 32 characters, you should do something like this:

new Flags[33][128];
new Client = GetRandomClient(); // an example.
formatex(Flags[Client], charsmax(Flags[]), "%s", "abcdefghijklmnopqrstu1234567890-=\[];',./_+|{}:^"<>?`~!@#$%^^&*()"); // note that ^" means " and ^^ means ^ for real, in a string.
if (containi(Flags[Client], "#") != -1) { // client got # flag. }
Yes, already made something like this on forum, but get_flags and (or, don't remember) read_flags doesn't support it, you have convert those natives.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 10:11.


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