Raised This Month: $ Target: $400
 0% 

Cvar by Strings (Or Flags)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-19-2010 , 11:59   Re: Cvar by Strings (Or Flags)
Reply With Quote #1

Using bit flags would be cheaper.
PHP Code:
enum _:Flags (<<=1)
{
     
FlagA 1,  //'a'
     
FlagB,  //'b'
     
FlagC,  //'c'
     
FlagD,  //'d '
     
FlagE   //'e'
}

new 
iFlags read_flagsszFlags );

if ( 
iFlags FlagA )
{
        
//player has flag a

__________________
Bugsy 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:51.


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