Dialogs not working
#6

Do not reply if you don't even understand English at a basic level, what part of "This code turns into this code" do you not understand?

This code (without easydialog):
pawn Код:
#define DIALOG_WEAPON (1337)

CMD:weapons(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapon Menu", "9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-off Shotgun\nCombat Shotgun", "Select", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == DIALOG_WEAPON)
    {
        if (response)
        {
            new str[64];
            format(str, 64, "You have selected the '%s'.", inputtext);

            GivePlayerWeapon(playerid, listitem + 22, 500);
            SendClientMessage(playerid, -1, str);
        }
    }
    return 1;
}
Looks like this, with easydialog include:
pawn Код:
CMD:weapons(playerid, params[])
{
    Dialog_Show(playerid, WeaponMenu, DIALOG_STYLE_LIST, "Weapon Menu", "9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-off Shotgun\nCombat Shotgun", "Select", "Cancel");
    return 1;
}

Dialog:WeaponMenu(playerid, response, listitem, inputtext[])
{
    if (response)
    {
        new str[64];
        format(str, 64, "You have selected the '%s'.", inputtext);

        GivePlayerWeapon(playerid, listitem + 22, 500);
        SendClientMessage(playerid, -1, str);
    }
    return 1;
}
Quote:
Originally Posted by lwilson
Посмотреть сообщение
show me DialogResponse and DialogPerformed
Please stop replying as you seem to lack the knowledge required to assist me in this matter.
Reply


Messages In This Thread
Dialogs not working - by Markus1337 - 10.01.2015, 13:57
Re: Dialogs not working - by lwilson - 10.01.2015, 14:02
Re: Dialogs not working - by Markus1337 - 10.01.2015, 14:12
Re: Dialogs not working - by lwilson - 10.01.2015, 14:14
Re: Dialogs not working - by lwilson - 10.01.2015, 14:17
Re: Dialogs not working - by Markus1337 - 10.01.2015, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)