SA-MP Forums Archive
Dialog Ignores Listitem Numbers >2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Ignores Listitem Numbers >2 (/showthread.php?tid=644981)



Dialog Ignores Listitem Numbers >2 - pulsare - 17.11.2017

Hey,

My dialog ignores Listitem Number 3 (+)

The others are working fine

Nothing happens and the dialog is not shown

I tried all Dialog styles DIALOG_LIST DIALOG_TABLIST DIALOG_TABLIST_HEADERS

no one works.

ShowPlayerDialog(playerid, SETTINGS, DIALOG_STYLE_TABLIST, "Settings","Change Password\nChange Name\nChange Security Code\nDelete Security Code", "Select", "Exit");

//"Delete Security Code" is not working

Quote:

if(dialogid == SETTINGS)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,NEWPW,DIALOG_STYLE_INPUT ,"Password","Choose a new Password","Choose","Cancel");
}
if(listitem == 1)
{
SendClientMessage(playerid,BLAU,"You dont have a namechange - Fuction not worked out");
}
if(listitem == 2)
{
if(sSpieler[playerid][pPassport] == 1)
{
ShowPlayerDialog(playerid,NEWCODE,DIALOG_STYLE_INP UT,"Security Check","Enter your current Security Code first","Choose","Cancel");
}
else
{
SendClientMessage(playerid,ROT,"You don't have a Security Code! You must create one first!");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid,AREOK,DIALOG_STYLE_INPUT ,"Security Check","Enter your current Security Code first","Choose","Cancel"); [// This dialog is not shown
}

return 1;
}
}
}




Re: Dialog Ignores Listitem Numbers >2 - Lucases - 17.11.2017

Why do you use DIALOG_STYLE_TABLIST when you can use DIALOG_STYLE_LIST
You aren't using any " \t "


Re: Dialog Ignores Listitem Numbers >2 - pulsare - 17.11.2017

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Why do you use DIALOG_STYLE_TABLIST when you can use DIALOG_STYLE_LIST
You aren't using any " \t "
I used DIALOG_STYLE_LIST but it won't work

Quote:
Originally Posted by pulsare
Посмотреть сообщение
I tried all Dialog styles DIALOG_LIST DIALOG_TABLIST DIALOG_TABLIST_HEADERS



Re: Dialog Ignores Listitem Numbers >2 - Lucases - 17.11.2017

Then you already had a problem if you can't use any of these dialogs.


Re: Dialog Ignores Listitem Numbers >2 - pulsare - 17.11.2017

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Then you already had a problem if you can't use any of these dialogs.
I know that I have a Problem lol.

Do you know how to handle that?


Re: Dialog Ignores Listitem Numbers >2 - Lucases - 17.11.2017

Quote:
Originally Posted by pulsare
Посмотреть сообщение

ShowPlayerDialog(playerid, SETTINGS, DIALOG_STYLE_TABLIST, "Settings","Change Password\nChange Name\nChange Security Code\nDelete Security Code", "Select", "Exit");

//"Change Security Code" is not working
"Change Security Code" is listitem 2.
Which listitem doesn't work, you said the second one, but in the code you said it's the third one


Re: Dialog Ignores Listitem Numbers >2 - pulsare - 17.11.2017

Quote:
Originally Posted by Lucases
Посмотреть сообщение
"Change Security Code" is listitem 2.
Which listitem doesn't work, you said the second one, but in the code you said it's the third one
yeah sorry I mean "Delete security code"


Re: Dialog Ignores Listitem Numbers >2 - pulsare - 17.11.2017

push


Re: Dialog Ignores Listitem Numbers >2 - Juvanii - 17.11.2017

PHP код:
ShowPlayerDialog(playeridSETTINGSDIALOG_STYLE_LIST"Settings","Change Password\nChange Name\nChange Security Code\nDelete Security Code""Select""Exit");
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == SETTINGS)
    {
        if(!
response) return 1;
        if(
listitem == 0) return ShowPlayerDialog(playerid,NEWPW,DIALOG_STYLE_INPUT ,"Password","Choose a new Password","Choose","Cancel");
        if(
listitem == 1) return SendClientMessage(playerid,BLAU,"You dont have a namechange - Fuction not worked out");
        if(
listitem == 2)
        {
            if(
sSpieler[playerid][pPassport] == 1) return ShowPlayerDialog(playerid,NEWCODE,DIALOG_STYLE_INP UT,"Security Check","Enter your current Security Code first","Choose","Cancel");
            
SendClientMessage(playerid,ROT,"You don't have a Security Code! You must create one first!");
            return 
1;
        }
         if(
listitem == 3) return ShowPlayerDialog(playerid,AREOK,DIALOG_STYLE_INPUT ,"Security Check","Enter your current Security Code first","Choose","Cancel"); [// This dialog is not shown
    
}
    return 
1;