SA-MP Forums Archive
if(dialogid == number) Not working? - 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: if(dialogid == number) Not working? (/showthread.php?tid=363146)



if(dialogid == number) Not working? - maramizo - 26.07.2012

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.


Re: if(dialogid == number) Not working? - FireCat - 26.07.2012

Is that in a filterscript?


Re: if(dialogid == number) Not working? - maramizo - 26.07.2012

No, gamemode.


Re: if(dialogid == number) Not working? - [KHK]Khalid - 26.07.2012

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?


Re: if(dialogid == number) Not working? - Vince - 26.07.2012

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


Re: if(dialogid == number) Not working? - maramizo - 26.07.2012

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