Dialog Reponse problem
#1

I tried to do not have to choose something from the dialogue but failed here is the code

pawn Код:
if(dialogid == JAZIK_LIST && response)
    {
        if (response == 1)
        {
        IgracInfo[playerid][Jezik] =1;
        SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вашиот официјален јазик е Македонски.");
        SetTimerEx("login", 0 * 1000, 0, "%i", playerid);
        }
        if (response == 2)
        {
        IgracInfo[playerid][Jezik] =2;
        SendClientMessage(playerid,COLOR_LIGHTBLUE,"Vasi oficijalni jezik je Croatian.");
        SetTimerEx("login", 0 * 1000, 0, "%i", playerid);
        }
        if (response == 3)
        {
        IgracInfo[playerid][Jezik] =3;
        SendClientMessage(playerid,COLOR_LIGHTBLUE,"Your official language is English.");
        SetTimerEx("login", 0 * 1000, 0, "%i", playerid);
        }
        else ShowPlayerDialog(playerid,JAZIK_LIST,DIALOG_STYLE_LIST,"Јазик - Jezik - Language","Македонски\nCroatian\nEnglish","OK","Cancel");
    }
I mean I do not have to choose something from the option you can not click on non

Dialogue is the list
Reply
#2

Inside OnDialogResponse.
pawn Код:
if(dialogid == JAZIK_LIST)
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
            {
                IgracInfo[playerid][Jezik] =1;
                SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вашиот официјален јазик е Македонски.");
                SetTimerEx("login", 0 * 1000, 0, "i", playerid);
            }
            case 1:
            {
                IgracInfo[playerid][Jezik] =2;
                SendClientMessage(playerid,COLOR_LIGHTBLUE,"Vasi oficijalni jezik je Croatian.");
                SetTimerEx("login", 0 * 1000, 0, "i", playerid);
            }
            case 2:
            {
                IgracInfo[playerid][Jezik] =3;
                SendClientMessage(playerid,COLOR_LIGHTBLUE,"Your official language is English.");
                SetTimerEx("login", 0 * 1000, 0, "i", playerid);
            }
        }
    }
    else ShowPlayerDialog(playerid,JAZIK_LIST,DIALOG_STYLE_LIST,"Јазик - Jezik - Language","Македонски\nCroatian\nEnglish","OK","Cancel");
}
try this it should work

Edit: i use 'i' in SetTimerEx not '%i' although it doesn't realy matter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)