Dialog returns to the first dialog in secs. - 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 returns to the first dialog in secs. (
/showthread.php?tid=211506)
Dialog returns to the first dialog in secs. -
THE_KNOWN - 15.01.2011
hello everyone. Im tring to script a driving license system. I tried to script in such a way that when i enter the pickup i placed in the diving school itll show me the dialog where it asks mee whether i want to take a theory test or practical.
Everything is fine but i have only prob i.e. it returns back to the first dialog (he theory or practical test options) in 1 sec. i need help with that.
P.S- i had to delete it as i just changed the server to MySQL and i didnt know how to setup the driving things and all.
so i dont have the code atm
Re: Dialog returns to the first dialog in secs. -
[UG]Scripter - 15.01.2011
Until y post the code.
UN officially:
Thread Locked
Re: Dialog returns to the first dialog in secs. -
[UG]Scripter - 15.01.2011
Until you post the code.
UN officially:
Thread Locked
Re: Dialog returns to the first dialog in secs. -
Anthonyx3' - 15.01.2011
Can you show your on dialogresponses? and the dialogs needed for this.
Re: Dialog returns to the first dialog in secs. -
THE_KNOWN - 15.01.2011
Код:
if(dialogid == 3)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Drivingschool:", "Take theory test\n take practical test", "Ok", "Cancel");
return 1;
}
if(dialogid == 4)
{
if(responce)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Which side of the road should you drive?", "Left\nRight","Ok","Cancel");
}
case 1:
{
SendClientMessage(playerid, red, "WIP");
}
}
}
else
{
SendClientMessage(playerid, red, "You cancelled");
}
return 1;
}
if(dialogid == 5)
{
if(responce)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, red, "wrong");
}
case 1:
{
SendClientMessage(playerid, green, "You've got your license");
dlic[playerid]=1;
}
}
}
else
{
SendClientMessage(playerid, red, "You cancelled");
}
return 1;
}
Re: Dialog returns to the first dialog in secs. -
THE_KNOWN - 15.01.2011
Quote:
Originally Posted by THE_KNOWN
Код:
if(dialogid == 3)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Drivingschool:", "Take theory test\n take practical test", "Ok", "Cancel");
return 1;
}
if(dialogid == 4)
{
if(responce)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Which side of the road should you drive?", "Left\nRight","Ok","Cancel");
}
case 1:
{
SendClientMessage(playerid, red, "WIP");
}
}
}
else
{
SendClientMessage(playerid, red, "You cancelled");
}
return 1;
}
if(dialogid == 5)
{
if(responce)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, red, "wrong");
}
case 1:
{
SendClientMessage(playerid, green, "You've got your license");
dlic[playerid]=1;
}
}
}
else
{
SendClientMessage(playerid, red, "You cancelled");
}
return 1;
}
|
Help?
Re: Dialog returns to the first dialog in secs. -
Anthonyx3' - 15.01.2011
First if all, its response, not responce
Second, remove the returns 1 after each dialog, you dont need that.