Raised This Month: $12 Target: $400
 3% 

Random Enum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XSlayer
Member
Join Date: Dec 2021
Old 05-15-2022 , 18:57   Random Enum
Reply With Quote #1

Hi, i wanted to set a random num from a list, i have a tag mismatch and idk what is:

PHP Code:
enum ADV_MELEE_DIRECTION
{    
    
PUNCH_UP 0,
    
PUNCH_UPPERLEFT,
    
PUNCH_LEFT,
    
PUNCH_LOWERLEFT,
    
PUNCH_DOWN,
    
PUNCH_LOWERRIGHT,
    
PUNCH_RIGHT,
    
PUNCH_UPPERRIGHT,
    
KICK_UP// = 8
    
KICK_UPPERLEFT,
    
KICK_LEFT,
    
KICK_LOWERLEFT,
    
KICK_DOWN,
    
KICK_LOWERRIGHT,
    
KICK_RIGHT,
    
KICK_UPPERRIGHT,
    
PUNCH_NODIR,  
    
KICK_NODIR 
};
public 
ONClient )
{
        
addArrows(Client"DanceArrows"Here_Goes_The_Random_Arrows );

XSlayer is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-15-2022 , 23:29   Re: Random Enum
Reply With Quote #2

You need to tag the enumerator in the function. Will need to see addArrows() to fix warnings you'll likely get.
PHP Code:
public ONClient )
{
    new 
ADV_MELEE_DIRECTION:amdRandom ADV_MELEE_DIRECTION:random_:ADV_MELEE_DIRECTION );
    
    
addArrows(Client"DanceArrows"amdRandom );

You can try this
PHP Code:
addArrowsid SomeString[] , ADV_MELEE_DIRECTION:ArrowType )
{

__________________

Last edited by Bugsy; 05-15-2022 at 23:31.
Bugsy is offline
Reply


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 07:17.


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