if(dialogid == number) Not working?
#1

pawn Код:
CMD:walkstyle(playerid, params[])
{
    if(PlayerInfo[playerid][pDonateRank] > 3)
    {
        ShowPlayerDialog(playerid, 66886, DIALOG_STYLE_LIST, "Walking Style", "Pedestrian\nGangster\nGangster II\nOld\nFat and Old\nFat\nLady\nLady II\nLady III\nLady IV\nDrunk\nBlind\nRemove current walk","OK","Cancel");
        return 1;
    }
    else
    {
        ShowPlayerDialog(playerid, 66887, DIALOG_STYLE_LIST, "Walking Style", "Pedestrian\nGangster\nOld\nLady\nLady II\nRemove current walk","OK","Cancel");
        return 1;
    }
}
pawn Код:
if(dialogid == 66886)
    {
        if(response)
        {
            if(listitem >= 0 && listitem < 13)
            {
                SetPlayerWalkingStyle(playerid, listitem+2);
                SendClientMessage(playerid, COLOR_WHITE, "You have successfully changed your walking style.");
                SaveWS(playerid);
            }
            else if(listitem == 13)
            {
                SetPlayerWalkingStyle(playerid, 3);
                SendClientMessage(playerid, COLOR_WHITE, "You have removed your current walking style.");
                SaveWS(playerid);
            }
            SendClientMessage(playerid, COLOR_WHITE, "BUG #1.");
        }
        SendClientMessage(playerid, COLOR_WHITE, "BUG #3.");
    }
    SendClientMessage(playerid, COLOR_WHITE, "BUG #2.");
It doesn't continue off the if line, as it does not read the rest of the script that's placed inside it, everytime I use the dialog it says "BUG #2.", as I have placed it.
Reply
#2

Is that in a filterscript?
Reply
#3

No, gamemode.
Reply
#4

Why a new topic?

You didn't answer the questions in your old topic.

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
Do the other dialogs work? If not then you might have a return 1; in OnDialogResponse in other scripts that blocks them; it should return 0 not 1.
Have you checked that?
Reply
#5

Max dialogid is 32767.
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
SOLVED.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)