Help with dialog [SIMPLE]
#1

Heey guys,

I just need a little help with my dialog. I made a list dialog:

PHP код:
if(dialogid == 444)//dialog id response
            
{
                if(
response)
                    {
                if(
listitem == 0)//the listitem0, defines the number one option of the dialog
                    
{
                   if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                        
{
                        
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");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid24170);//deagle
                        
GivePlayerWeapon(playerid41);//Knife
                        
GivePlayerWeapon(playerid31400);//M4
                        
GivePlayerWeapon(playerid162);//Grenades
                        
}
                         else
                        {
                            
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                            
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;
                          }
                    } 
The problem is:

If I click on << Back button (the msg dialog) , the dialog will close.

What I want is that if you click on << Back button, that it will retrurn you back to the list dialog(the tablist_headers one).

I am a bit confused so I need help, lol.

Thank you
Reply
#2

PHP код:
if(dialogid == 444)//dialog id response
{
    if(
response)
    {
         if(
listitem == 0)//the listitem0, defines the number one option of the dialog
           
{
             if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
               
{
                 
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");
                
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                
PickedClass[playerid] = 1;
                   
SetPlayerVirtualWorld(playerid0);
                 
TogglePlayerControllable(playerid1);
                 
ResetPlayerWeapons(playerid);
                 
GivePlayerWeapon(playerid24170);//deagle
                 
GivePlayerWeapon(playerid41);//Knife
                 
GivePlayerWeapon(playerid31400);//M4
                 
GivePlayerWeapon(playerid162);//Grenades
                  
}
                   else
                   {
                     
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                       
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;
                   }
            }
        }
    }
    else
    {
        return (
here write your cmd for opening this dialog)
        return 
1;
    } 
If your cmd for opening dialog is lets say "opendialog" then you write
Код:
return opendialog
not sure if it is going to work but try it

EDIT: Nope don't try it. Because everytime you try to exit it will return you back to dialog so you won't be able to exit it
Reply
#3

Quote:
Originally Posted by Micko123
Посмотреть сообщение
PHP код:
if(dialogid == 444)//dialog id response
{
    if(
response)
    {
         if(
listitem == 0)//the listitem0, defines the number one option of the dialog
           
{
             if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
               
{
                 
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");
                
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                
PickedClass[playerid] = 1;
                   
SetPlayerVirtualWorld(playerid0);
                 
TogglePlayerControllable(playerid1);
                 
ResetPlayerWeapons(playerid);
                 
GivePlayerWeapon(playerid24170);//deagle
                 
GivePlayerWeapon(playerid41);//Knife
                 
GivePlayerWeapon(playerid31400);//M4
                 
GivePlayerWeapon(playerid162);//Grenades
                  
}
                   else
                   {
                     
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                       
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;
                   }
            }
        }
    }
    else
    {
        return (
here write your cmd for opening this dialog)
        return 
1;
    } 
If your cmd for opening dialog is lets say "opendialog" then you write
Код:
return opendialog
not sure if it is going to work but try it

EDIT: Nope don't try it. Because everytime you try to exit it will return you back to dialog so you won't be able to exit it
PHP код:

if(dialogid == 444)//dialog id response
{
    if(
response)
    {
         if(
listitem == 0)//the listitem0, defines the number one option of the dialog
           
{
             if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
               
{
                 
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");
                
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                
PickedClass[playerid] = 1;
                   
SetPlayerVirtualWorld(playerid0);
                 
TogglePlayerControllable(playerid1);
                 
ResetPlayerWeapons(playerid);
                 
GivePlayerWeapon(playerid24170);//deagle
                 
GivePlayerWeapon(playerid41);//Knife
                 
GivePlayerWeapon(playerid31400);//M4
                 
GivePlayerWeapon(playerid162);//Grenades
                  
}
                   else
                   {
                     
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                       
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;
                   }
            }
      }
    
//}
    
else
    {
        return (
here write your cmd for opening this dialog)
        return 
1;
    } 
Reply
#4

Quote:
Originally Posted by Micko123
Посмотреть сообщение
PHP код:
if(dialogid == 444)//dialog id response
{
    if(
response)
    {
         if(
listitem == 0)//the listitem0, defines the number one option of the dialog
           
{
             if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
               
{
                 
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");
                
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                
PickedClass[playerid] = 1;
                   
SetPlayerVirtualWorld(playerid0);
                 
TogglePlayerControllable(playerid1);
                 
ResetPlayerWeapons(playerid);
                 
GivePlayerWeapon(playerid24170);//deagle
                 
GivePlayerWeapon(playerid41);//Knife
                 
GivePlayerWeapon(playerid31400);//M4
                 
GivePlayerWeapon(playerid162);//Grenades
                  
}
                   else
                   {
                     
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                       
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;
                   }
            }
        }
    }
    else
    {
        return (
here write your cmd for opening this dialog)
        return 
1;
    } 
If your cmd for opening dialog is lets say "opendialog" then you write
Код:
return opendialog
not sure if it is going to work but try it

EDIT: Nope don't try it. Because everytime you try to exit it will return you back to dialog so you won't be able to exit it
Ok thanks anyways. Anyone?
Reply
#5

post your dialog here
Reply
#6

The one I want to open:
PHP код:
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"""); 
The dialog response:
PHP код:
if(dialogid == 444)//dialog id response
            
{
                if(
response)
                    {
                if(
listitem == 0)//the listitem0, defines the number one option of the dialog
                    
{
                   if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                        
{
                        
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");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid24170);//deagle
                        
GivePlayerWeapon(playerid41);//Knife
                        
GivePlayerWeapon(playerid31400);//M4
                        
GivePlayerWeapon(playerid162);//Grenades
                        
}
                         else
                        {
                            
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                            
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;
                          }
                    } 
Reply
#7

PHP код:
    if(dialogid == 444)//dialog id response
    
{
              if(
response)
              {
                if(
listitem == 0)//the listitem0, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                     
{
                        
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");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid24170);//deagle
                        
GivePlayerWeapon(playerid41);//Knife
                        
GivePlayerWeapon(playerid31400);//M4
                        
GivePlayerWeapon(playerid162);//Grenades
                      
}
                       else
                       {
                        
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                         
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;
                    }
                 }
            }
            else 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
#8

Quote:
Originally Posted by Slawiii
Посмотреть сообщение
PHP код:
    if(dialogid == 444)//dialog id response
    
{
              if(
response)
              {
                if(
listitem == 0)//the listitem0, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                     
{
                        
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");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid24170);//deagle
                        
GivePlayerWeapon(playerid41);//Knife
                        
GivePlayerWeapon(playerid31400);//M4
                        
GivePlayerWeapon(playerid162);//Grenades
                      
}
                       else
                       {
                        
SendClientMessage(playeridCOLOR_RED"You have not enough score to choose this class");
                         
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;
                    }
                 }
            }
            else 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""");
    } 
Doesnt work
Reply
#9

not showing ?
Reply
#10

bro i m understand you so post the dialog of DIALOG_CLASS_ASSAULT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)