Raised This Month: $ Target: $400
 0% 

HELP Best way to do


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-25-2014 , 05:13   Re: HELP Best way to do
Reply With Quote #4

You want to know which duel is currently running ? Then, do it with a simple boolean.

PHP Code:
enum _eDuels
{
    
DUEL_NONE,
    
DUEL_SCOUT,
    
DUEL_KNIFE

}

new 
boolIsDuel eDuels 
When he choose knife duel:
PHP Code:
IsDuel DUEL_NONE   ] = false
IsDuel 
DUEL_SCOUT  ] = false
IsDuel 
DUEL_KNIFE  ] = true 
When he choose a scout duel:
PHP Code:
IsDuel DUEL_NONE   ] = false
IsDuel 
DUEL_SCOUT  ] = true
IsDuel 
DUEL_KNIFE  ] = false 
When a duel ends:
PHP Code:
IsDuel DUEL_NONE   ] = true
IsDuel 
DUEL_SCOUT  ] = false
IsDuel 
DUEL_KNIFE  ] = false 
When you give weapons or sth like this, just check which bool is true.

PHP Code:
if ( ! IsDuel DUEL_NONE ] ) {

    if ( 
IsDuel DUEL_SCOUT ] ) {
        
//we have a scout duel
        
        
    
}   
    
    if ( 
IsDuel DUEL_KNIFE ] ){
       
//we have a knife duel
    
    
    
}

I don't know what you want to do with duel_none, but based on your previous example, this is how you should do it, whatever it is.

Last edited by HamletEagle; 06-25-2014 at 05:15.
HamletEagle is offline
 



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


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