DIALOG help - 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 help (
/showthread.php?tid=522234)
DIALOG help -
leo9 - 26.06.2014
Guys pls help i wanna show a input dialog after respone listitem dialog here is code
Код:
ShowPlayerDialog(playerid, DIALOG_DRUGS1, DIALOG_STYLE_LIST, string, "Foroosh Daroo\nKharid Daroo\nKharid dane", "Kharid", "Cancel");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_DRUGS1)
{
if(response)
{
// Give them the weapon
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, DIALOG_SELLDRUG1, DIALOG_STYLE_INPUT, "Foroosh Daroo", "Meghdar mored nazar baraye foroosh daroo ra vared konid", "Foroosh", "Cancel");
case 1: ShowPlayerDialog(playerid, DIALOG_BUYDRUG1, DIALOG_STYLE_INPUT, "Kharid Daroo", "Meghdar mored nazar baraye kharid daroo ra vared konid", "Kharid", "Cancel");
case 2: ShowPlayerDialog(playerid, DIALOG_SELLDRUG1, DIALOG_STYLE_INPUT, "Kharid Dane", "Meghdar mored nazar baraye kharid dane ra vared konid", "Kharid", "Cancel");
}
}
}
return 1;
}
PLS help
Re: DIALOG help -
MacT - 26.06.2014
in to top:
#define DIALOG_DRUGS1 676
Dialog not showing or what?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_DRUGS1)
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_SELLDRUG1, DIALOG_STYLE_INPUT, "Foroosh Daroo", "Meghdar mored nazar baraye foroosh daroo ra vared konid", "Foroosh", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_BUYDRUG1, DIALOG_STYLE_INPUT, "Kharid Daroo", "Meghdar mored nazar baraye kharid daroo ra vared konid", "Kharid", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_SELLDRUG1, DIALOG_STYLE_INPUT, "Kharid Dane", "Meghdar mored nazar baraye kharid dane ra vared konid", "Kharid", "Cancel");
}
}
}
}
return 1;