else problem!
#1

Heey,

I made a dialog:

PHP код:
if(dialogid == 444)
    {
        if(
listitem == 0)
        {
            if(
response// If they clicked 'Yes' or pressed enter
            
{
                
ShowPlayerDialog(playeridDIALOG_CLASS_ASSAULTDIALOG_STYLE_MSGBOX"Assault Class""The Assault Class is the most common used class by a lot of swat and terrorits.\n\n{FF8000}Abilities: {AFAFAF}This class is upgradable.\n This class has many featers available at further levels, such as extra weapon damage, rocket launcher and more!\n\n{FF8000}Weapons: {AFAFAF}Knife, Desert Eagle, M4, Grenades""Choose","<< Back");
            }
            else
            {
                 
ShowPlayerDialog(playeridDIALOG_CLASSDIALOG_STYLE_TABLIST_HEADERS"Class Selection""Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status""View""");
            }
        }
        return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}
    return 
0// You MUST return 0 here! Just like OnPlayerCommandText.

So I told if the player clicks on << Back button in the message dialog,

the tablist dialog will show up.

But, if I click on << Back it will close the whole dialog.

I want that if the player pick an option in the first dialog (id 444), the message dialog show up (that works) and if they click << Back, that they will show up tablist dialog again.


Please help me.
Reply
#2

post Dialog Response of DIALOG_CLASS_ASSAULT
Reply
#3

PHP код:
ShowPlayerDialog(playeridDIALOG_CLASS_ASSAULTDIALOG_STYLE_MSGBOX"Assault Class""The Assault Class is the most common used class by a lot of swat and terrorits.\n\n{FF8000}Abilities: {AFAFAF}This class is upgradable.\n This class has many featers available at further levels, such as extra weapon damage, rocket launcher and more!\n\n{FF8000}Weapons: {AFAFAF}Knife, Desert Eagle, M4, Grenades""Choose","<< Back"); 
Reply
#4

add this under OnDialogResponse

PHP код:
 if(dialogid == DIALOG_CLASS_ASSAULT
    { 
        if(!
response) return ShowPlayerDialog(playeridDIALOG_CLASSDIALOG_STYLE_TABLIST_HEADERS"Class Selection""Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status""View"""); 
    } 
Reply
#5

If I correctly understand your application:
PHP код:
    if(dialogid == 444)
    {
        if(
listitem == 0)
        {
            if(
response// If they clicked 'Yes' or pressed enter
            
{
                
ShowPlayerDialog(playeridDIALOG_CLASS_ASSAULTDIALOG_STYLE_MSGBOX"Assault Class""The Assault Class is the most common used class by a lot of swat and terrorits.\n\n{FF8000}Abilities: {AFAFAF}This class is upgradable.\n This class has many featers available at further levels, such as extra weapon damage, rocket launcher and more!\n\n{FF8000}Weapons: {AFAFAF}Knife, Desert Eagle, M4, Grenades""Choose","<< Back");
            }
            else
            {
                 
ShowPlayerDialog(playeridDIALOG_CLASSDIALOG_STYLE_TABLIST_HEADERS"Class Selection""Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status""View""");
            }
        }
        return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    
}

    if(
dialogid == DIALOG_CLASS_ASSAULT)
    {
        if(
response == 0)
        {
            
ShowPlayerDialog(playerid444DIALOG_STYLE_TABLIST_HEADERS"Class Selection""Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status""View""");
        }
        return 
1;
    }
    return 
0// You MUST return 0 here! Just like OnPlayerCommandText.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)