Dialog not functioning
#1

I'm trying to do this dialog, where i can choose my gender and spawn place in LARP, but it wont work for some reasons.. Please help

pawn Code:
#define DIALOOG_SEXMENU 707
#define DIALOOG_KODAK 708
pawn Code:
ShowPlayerDialog(playerid, DIALOOG_SEXMENU, DIALOG_STYLE_LIST, "Sugu","Mees\nNaine ", "Vali", "Kaktesta");
pawn Code:
if(dialogid == DIALOOG_SEXMENU)
    {
        if(!response)
        {
            if(listitem == 0) // Male
            {
                if(RegistrationStep[playerid] == 1)
                {
                    SetPlayerInterior(playerid,1);
                    PlayerInfo[playerid][pSex] = 1;
                    SetPlayerSkin(playerid, 185);
                    SendClientMessage(playerid, 0xCECECEFF, "Te olete meessoost.");
                    return 1;
                }
            }
            if(listitem == 1) // Female
            {
                if(RegistrationStep[playerid] == 1)
                {
                    SetPlayerInterior(playerid,1);
                    PlayerInfo[playerid][pSex] = 2;
                    SetPlayerSkin(playerid, 193);
                    SendClientMessage(playerid, 0xCECECEFF, "Te olete naissoost.");
                    return 1;
                }
                else if(RegistrationStep[playerid] == 2)
                {
                    ShowPlayerDialog(playerid, DIALOOG_KODAK, DIALOG_STYLE_LIST, "Kus te elada soovite?","Blueberry\nDillimore\nMontgomery ", "Vali", "Katkesta");
                }
            }
        }
        return 1;
    }
if(dialogid == DIALOOG_KODAK)
    {
        if(!response)
        {
            if(listitem == 0) //
            {
                if(RegistrationStep[playerid] == 2)
                {
                    PlayerInfo[playerid][pOrigin] = 1;
                    RegistrationStep[playerid] = 0;
                    TutTime[playerid] = 0; PlayerInfo[playerid][pTut] = 1;
                    SetPlayerInterior(playerid, 3);
                    SetPlayerPos(playerid, 666.3457,-449.3539,16.3359);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerVirtualWorld(playerid, 0);
                    gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
                    TogglePlayerControllable(playerid, 1);
                    MedicBill[playerid] = 0;
                    AfterTutorial[playerid] = 1;
                    SetTimerEx("UnsetAfterTutorial", 2500, false, "i", playerid);
                    SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
                    SetPlayerSpawn(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW2, "Olgu, sa oled nььdsest Blueberry elanik.");
                    return 1;
                }
            }
            if(listitem == 1) //
            {
                if(RegistrationStep[playerid] == 2)
                {
                    PlayerInfo[playerid][pOrigin] = 2;
                    RegistrationStep[playerid] = 0;
                    TutTime[playerid] = 0; PlayerInfo[playerid][pTut] = 1;
                    SetPlayerInterior(playerid, 3);
                    SetPlayerPos(playerid, 667.5423,-450.6622,16.3359);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerVirtualWorld(playerid, 0);
                    gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
                    TogglePlayerControllable(playerid, 1);
                    MedicBill[playerid] = 0;
                    AfterTutorial[playerid] = 1;
                    SetTimerEx("UnsetAfterTutorial", 2500, false, "i", playerid);
                    SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
                    SetPlayerSpawn(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW2, "Olgu, sa oled nььdsest Dillimore elanik.");
                    return 1;
                }
            }
            if(listitem == 2) //
            {
                if(RegistrationStep[playerid] == 2)
                {
                    PlayerInfo[playerid][pOrigin] = 3;
                    RegistrationStep[playerid] = 0;
                    TutTime[playerid] = 0; PlayerInfo[playerid][pTut] = 1;
                    SetPlayerInterior(playerid, 3);
                    SetPlayerPos(playerid, 1242.2026,211.4727,19.5547);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerVirtualWorld(playerid, 0);
                    gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
                    TogglePlayerControllable(playerid, 1);
                    MedicBill[playerid] = 0;
                    AfterTutorial[playerid] = 1;
                    SetTimerEx("UnsetAfterTutorial", 2500, false, "i", playerid);
                    SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
                    SetPlayerSpawn(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW2, "Olgu, sa oled nььdsest Montgomery elanik.");
                    return 1;
                }
            }
        }
        return 1;
    }
Reply
#2

Case thing doesnt help really..
With the dialog i created, it shows the first dialog, but it doesnt function and dont direct to second dialog. Please help, i know someone can help me!

EDIT: Nevermind, i got it myself
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)