dialog (switchitem) isn't working. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dialog (switchitem) isn't working. (
/showthread.php?tid=272828)
dialog (switchitem) isn't working. -
Jack_Leslie - 30.07.2011
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.
Re: dialog (switchitem) isn't working. -
Shockey HD - 30.07.2011
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);
Re: dialog (switchitem) isn't working. -
Jack_Leslie - 30.07.2011
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.
Re: dialog (switchitem) isn't working. -
Kush - 30.07.2011
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.
Re: dialog (switchitem) isn't working. -
Jack_Leslie - 30.07.2011
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.
Re: dialog (switchitem) isn't working. -
Kush - 30.07.2011
Quote:
Originally Posted by Jack_Leslie
That worked, thanks.
|
No problem