AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can I use an enum like this? (https://forums.alliedmods.net/showthread.php?t=144006)

GXLZPGX 11-27-2010 17:24

How can I use an enum like this?
 
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.

Arkshine 11-27-2010 17:58

Re: How can I use an enum like this?
 
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.


All times are GMT -4. The time now is 11:20.

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