dialog (switchitem) isn't working.
#1

pawn Код:
if(dialogid == 2)
    {
        switch(listitem)
        {
            case 0:
            {
            ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Red County Citizenship","Enter your password below:","Register","Leave");
            return 1;
            }
            case 1:
            {
            SendClientMessage(playerid, RED,"You chose to quit!");
            Kick(playerid);
            }
        }
    }
It doesn't do the switching action, like doesn't kick or showplayerdialog, it just sends them to the spawn screen.
Reply
#2

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
pawn Код:
if(dialogid == 2)
    {
        switch(listitem)
        {
            case 0:
            {
            ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Red County Citizenship","Enter your password below:","Register","Leave");
            return 1;
            }
            case 1:
            {
            SendClientMessage(playerid, RED,"You chose to quit!");
            Kick(playerid);
            }
        }
    }
It doesn't do the switching action, like doesn't kick or showplayerdialog, it just sends them to the spawn screen.
Couldnt you use a response?

if (!response) return Kick(playerid);
Reply
#3

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
Couldnt you use a response?

if (!response) return Kick(playerid);
Done that and if I clicked item 1 it would kick me, but that's got nothing to do with my problem, my problem is neither item works.
Reply
#4

pawn Код:
if(dialogid == 2)
{
    if (!response) return Kick(playerid);
    if (response)
    {
        ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Red County Citizenship","Enter your password below:","Register","Leave");
        return 1;
    }
}
I use switches instead.
Reply
#5

Quote:
Originally Posted by Kush
Посмотреть сообщение
pawn Код:
if(dialogid == 2)
{
    if (!response) return Kick(playerid);
    if (response)
    {
        ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Red County Citizenship","Enter your password below:","Register","Leave");
        return 1;
    }
}
I use switches instead.
That worked, thanks.
Reply
#6

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
That worked, thanks.
No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)