Raised This Month: $ Target: $400
 0% 

Getting problems with return value


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-09-2013 , 03:44   Getting problems with return value
Reply With Quote #1

So I have this code:
PHP Code:
public Showrod(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        new 
CT get_pcvar_num (awp_ct)
        new 
TR get_pcvar_num (awp_t)
        
get_mapnameszMap charsmaxszMap ) );
        
map_active get_pcvar_num (g_map_active)
        
awp_active get_pcvar_num (g_awp_active)
        if (
map_active == 1//Checks if map_active is 1
        
{
            for( new 
sizeofmapnames ) ; i++ )
            {
                if ( 
containiszMap mapnames] ) !=-//Checks if map is the one mentioned in const mapnames
                
{
                    
client_print(idprint_center"VIP meniu sitame zemelapyje neveikia!"//Sends a message that VIP can't use VIP menu on that map
                
}
                if ( 
containiszMap mapnames] ) !=-//Checks if map is the one mentioned in const mapnames
                    
return; //Stop VIP from getting the VIP menu
            
}
        }
        new 
menu menu_create("\rVIP meniu:""Pressedrod"); //Creates menu
        
        
menu_additem(menu"\yM4A1 su Deagle""1"0); //Menu choise/case 1
        
menu_additem(menu"\yAK47 su Deagle""2"0); //Menu choise/case 2
        
if( iPlayers[0] >= TR && iPlayers[1] >= CT )
        {
            for( new 
sizeofawpmapnames ) ; i++ )
            {
                if (
awp_active == 1)
                {
                    if ( 
containiszMap awpmapnames] ) !=-//Checks if map is the one mentioned in const awpmapnames
                        
return HERE;
                }
            }
            
menu_additem(menu"\yAWP su Deagle""3"0); //Menu choise/case 3
        
}
        
        
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
menu_display(idmenu0); //Displays the menu
    
}

Where is the code "return HERE;" what should I type there so it wouldn't completely stop the public showrod, but would stop the menu_additem(menu, "\yAWP su Deagle", "3", 0)?

Last edited by Unkolix; 02-09-2013 at 05:28.
Unkolix 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 20:32.


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