Dialogs not working
#1

I left the script working and got back to it now a year later and none of the dialogs are working?
I'm using the easydialog include.

Includes in the script:
pawn Код:
#include <a_samp>
#include <a_mysql>
#include <formatnumber>
#include <easydialog>
#include <sscanf2>
#include <streamer>
#include <zcmd>
OnPlayerSpawn:
pawn Код:
Dialog_Show(playerid, Show:SKILL, DIALOG_STYLE_LIST, "Select Skill", "Con Artist\nRapist\nHitman\nPrivate Medic\nArms Dealer\nKidnapper", "Cancel","Cancel");
Bottom of Script:
pawn Код:
Dialog:SKILL(playerid, response, listitem, inputtext[])
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
                        {
                                SendClientMessage(playerid, -1,"Con artist");
                        }
            case 1:
            {
                SendClientMessage(playerid, -1,"Rapist");
            }
            case 2:
            {
                SendClientMessage(playerid, -1,"Hitman");
            }
            case 3:
                        {
                                SendClientMessage(playerid, -1,"Private Medic");
                        }
            case 4:
            {
                SendClientMessage(playerid, -1,"Arms Dealer");
            }
            case 5:
            {
                SendClientMessage(playerid, -1,"Kidnapper");
            }
        }
    }
    return 1;
}
Reply
#2

do you have define?

__________________
Next Life Roleplay [Refunding/Hiring]
SERVER IP: 172.245.220.133:7108
http://nextlife-rp.boards.net/
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=475838

Does not need defines as I recall it.
Reply
#4

there's define
Код:
#define DIALOG_WEAPON (1337)
Reply
#5

show me DialogResponse and DialogPerformed
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)