Raised This Month: $ Target: $400
 0% 

question about enums and switch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alekkkk
Member
Join Date: Mar 2012
Location: Bulgaria
Old 05-20-2012 , 00:15   question about enums and switch
Reply With Quote #1

Example:
PHP Code:
enum Weapon
{
    
Deagle,
    
AWP,
    
Knife,
    
Grenade,
    
Scout,
    
SG550,
    
G3SG1,
    
AK47,
    
M4A1
}
new 
gWeapon[MAX_PLAYERS 1][Weapon
Can i use switch and cases to retrieve which one is true (let say that i will set one of them to true) , or it can be done only with "if". And if it can is it better than "if"?
__________________
Alekkkk is offline
Send a message via Skype™ to Alekkkk
 


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

Forum Jump


All times are GMT -4. The time now is 00:26.


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