Raised This Month: $32 Target: $400
 8% 

Issue with menu back button


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 11-17-2017 , 03:20   Issue with menu back button
Reply With Quote #1

I've problem with back button menu, i try some ways and search any fix but not sucess.

Any idea for fix this, back button dont work:

PHP Code:
    switch (ActionIndex)
    {
        case 
MenuAction_Select:
        {
            
char option[64];
            
GetMenuItem(MenuIndexOptionIndexoptionsizeof(option));
            if(
strcmp(option"default") == 0)
            {
                
MenuIndex CreateMenu(laMenu);
                
MenuIndex.ExitBackButton true;
                
MenuIndex.SetTitle("Escolha a cor de sua Aura:");
                
MenuIndex.AddItem("rand""Random");
                
MenuIndex.AddItem("red""Vermelho");
                
MenuIndex.AddItem("green""Verde");
                
MenuIndex.AddItem("blue""Azul");
                
MenuIndex.AddItem("yellow""Amarelo");
                
MenuIndex.AddItem("purple""Roxo");
                
MenuIndex.AddItem("olive""Verde Oliva");
                
MenuIndex.AddItem("orange""Laranja");
                
MenuIndex.AddItem("pink""Rosa");
                
MenuIndex.AddItem("cyan""Azul Ciano");
                
MenuIndex.Display(ClientIndexMENU_TIME_FOREVER);
            }
        }
        case 
MenuAction_Cancel:
        {
            if(
OptionIndex == MenuCancel_ExitBack){
                
MenuIndex.Display(ClientIndexMENU_TIME_FOREVER);
            }
        }
        case 
MenuAction_End:
        {            
        }
    } 
Thanks.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 11-17-2017 , 03:47   Re: Issue with menu back button
Reply With Quote #2

Quote:
Originally Posted by rodrigo286 View Post
I've problem with back button menu, i try some ways and search any fix but not sucess.

Any idea for fix this, back button dont work:

PHP Code:
    switch (ActionIndex)
    {
        case 
MenuAction_Select:
        {
            
char option[64];
            
GetMenuItem(MenuIndexOptionIndexoptionsizeof(option));
            if(
strcmp(option"default") == 0)
            {
                
MenuIndex CreateMenu(laMenu);
                
MenuIndex.ExitBackButton true;
                
MenuIndex.SetTitle("Escolha a cor de sua Aura:");
                
MenuIndex.AddItem("rand""Random");
                
MenuIndex.AddItem("red""Vermelho");
                
MenuIndex.AddItem("green""Verde");
                
MenuIndex.AddItem("blue""Azul");
                
MenuIndex.AddItem("yellow""Amarelo");
                
MenuIndex.AddItem("purple""Roxo");
                
MenuIndex.AddItem("olive""Verde Oliva");
                
MenuIndex.AddItem("orange""Laranja");
                
MenuIndex.AddItem("pink""Rosa");
                
MenuIndex.AddItem("cyan""Azul Ciano");
                
MenuIndex.Display(ClientIndexMENU_TIME_FOREVER);
            }
        }
        case 
MenuAction_Cancel:
        {
            if(
OptionIndex == MenuCancel_ExitBack){
                
MenuIndex.Display(ClientIndexMENU_TIME_FOREVER);
            }
        }
        case 
MenuAction_End:
        {            
        }
    } 
Thanks.
Not tested

PHP Code:
public void menu_Settings(int client)
{
    
Menu MenuIndex = new Menu(MenuSettingsHandleMENU_ACTIONS_ALL);
    
char sTitle[64];
    
Format(sTitlesizeof(sTitle), "Escolha a cor de sua Aura:\n ");
    
MenuIndex.SetTitle(sTitle);
    
char buffer[128];
    
Format(buffersizeof(buffer), "Random");
    
MenuIndex.AddItem("0"buffer);
    
Format(buffersizeof(buffer), "Vermelho");
    
MenuIndex.AddItem("1"buffer);
    
Format(buffersizeof(buffer), "Verde");
    
MenuIndex.AddItem("2"buffer);
    
Format(buffersizeof(buffer), "Azul");
    
MenuIndex.AddItem("3"buffer);
    
Format(buffersizeof(buffer), "Amarelo");
    
MenuIndex.AddItem("4"buffer);
    
Format(buffersizeof(buffer), "Roxo");
    
MenuIndex.AddItem("5"buffer);
    
Format(buffersizeof(buffer), "Verde Oliva");
    
MenuIndex.AddItem("6"buffer);
    
Format(buffersizeof(buffer), "Laranja");
    
MenuIndex.AddItem("7"buffer);
    
Format(buffersizeof(buffer), "Rosa");
    
MenuIndex.AddItem("8"buffer);
    
Format(buffersizeof(buffer), "Azul Ciano");
    
MenuIndex.AddItem("9"buffer);
    
MenuIndex.ExitBackButton true;
    
MenuIndex.ExitButton true;
    
MenuIndex.Display(clientMENU_TIME_FOREVER);
}

public 
int MenuSettingsHandle(Menu menuMenuAction actionint param1int param2)
{
    switch (
action)
    {
        case 
MenuAction_Start:
        {
            
//PrintToServer("Displaying menu");
        
}
        
        case 
MenuAction_Select:
        {
            switch (
param2)
            {
                case 
0:
                {
                    
//code here Random
                    
menu_Settings(param1);
                }
                case 
1:
                {
                    
//code here Vermelho
                    
menu_Settings(param1);
                }
                case 
2:
                {
                    
//code here...
                    
menu_Settings(param1);
                }
                case 
3:
                {
                    
//code here...
                    
menu_Settings(param1);
                }
                case 
4:
                {
                    
//code here
                    
menu_Settings(param1);
                }
                case 
5:
                {
                    
//code here
                    
menu_Settings(param1);
                }
                case 
6:
                {
                    
//code here
                    
menu_Settings(param1);
                }
                case 
7:
                {
                    
//code here
                    
menu_Settings(param1);
                }
                case 
8:
                {
                    
//code here
                    
menu_Settings(param1);
                }
                case 
9:
                {
                    
//code here
                    
menu_Settings(param1);
                }
            }
        }
        case 
MenuAction_Cancel:
        {
            
//PrintToServer("Client %d's menu was cancelled for reason %d", param1, param2);
        
}
        
        case 
MenuAction_End:
        {
            
delete MenuIndex;
        }
    }
    return 
0;


Last edited by BassPower; 11-17-2017 at 05:48.
BassPower 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 14:59.


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