Raised This Month: $ Target: $400
 0% 

How can I use an enum like this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 11-27-2010 , 17:24   How can I use an enum like this?
Reply With Quote #1

PHP Code:
enum eSecondary
{
    
weapon_usp,
    
weapon_glock,
    
weapon_deagle,
    
weapon_p228,
    
weapon_elites,
    
weapon_fiveseven

PHP Code:
new eSecondarySecondary[33]; 
PHP Code:
give_item(idSecondary
I have a menu that sets eSecondary depending on what item they chose.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-27-2010 , 17:58   Re: How can I use an enum like this?
Reply With Quote #2

give_item needs a string.. You should know well now. What you want to do is to associate an enum to an array of strings containing the weapon names.
__________________
Arkshine 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 11:20.


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