DIALOG help
#1

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
Reply
#2

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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)