Need help with dialog...
#1

pawn Код:
if (dialogid == dregister2)
    {
        if (response)
        {
            if (listitem == 0)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
                pInfo[playerid][Fighting] = 0;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Normal");
            }
            if (listitem == 1)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
                pInfo[playerid][Fighting] = 1;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Boxing");
            }
            if (listitem == 2)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
                pInfo[playerid][Fighting] = 2;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - KungFu");
            }
            if (listitem == 3)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
                pInfo[playerid][Fighting] = 3;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Knee Head");
            }
            if (listitem == 4)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
                pInfo[playerid][Fighting] = 4;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Grab Kick");
            }
            if (listitem == 5)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
                pInfo[playerid][Fighting] = 5;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Elbow");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You selected 'cancel'");
        }
        ShowPlayerDialog(playerid,dregister3,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD.MM.YYYY )","Enter","Next");
    }
    if (dialogid == dregister3)
    {
        if(strlen(inputtext))
        {
            new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            split(inputtext, DateInfo, '.'); //<--- Here is the error (( text is not defined )) but how to define it??
            if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
            {
                ShowPlayerDialog(playerid,dregister3,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD.MM.YYYY )","Enter","Next");
                return 0;
            }
            new check = year - strval(DateInfo[2]);
            if(check == year)
            {
                ShowPlayerDialog(playerid,dregister3,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD.MM.YYYY )","Enter","Next");
                return 0;
            }
            if(strval(DateInfo[1]) > month)
            {
                check -= 1;
            }
            else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
            {
                check -= 1;
            }
            pInfo[playerid][Age] = check;
            return 0;
        }
        ShowPlayerDialog(playerid, dregister4, DIALOG_STYLE_LIST, "What is your religious position?", "Christian\nIslam\nHinduism\nBuddhism\nFolk\nShinto\nSikhism\nJudaism\nJainism\nBaha i Faith\nCheondoism\nTenrikyo\nWicca\nUnitarian Universalism\nAtheist ", "Religion", "Next");
    }
    if (dialogid == dregister4)
    {
        if (response)
        {
            if (listitem == 0)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Christian");
                pInfo[playerid][Religion] = 0;

            }
            if (listitem == 1)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Islam");
                pInfo[playerid][Religion] = 1;
            }
            if (listitem == 2)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Hinduism");
                pInfo[playerid][Religion] = 2;
            }
            if (listitem == 3)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Buddhism");
                pInfo[playerid][Religion] = 3;
            }
            if (listitem == 4)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Folk");
                pInfo[playerid][Religion] = 4;
            }
            if (listitem == 5)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Shinto");
                pInfo[playerid][Religion] = 5;
            }
            if (listitem == 6)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Sikhism");
                pInfo[playerid][Religion] = 6;
            }
            if (listitem == 7)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Judaism");
                pInfo[playerid][Religion] = 7;
            }
            if (listitem == 8)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Jainism");
                pInfo[playerid][Religion] = 8;
            }
            if (listitem == 9)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Baha i Faith");
                pInfo[playerid][Religion] = 9;
            }
            if (listitem == 10)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Cheondoism");
                pInfo[playerid][Religion] = 10;
            }
            if (listitem == 11)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Tenrikyo");
                pInfo[playerid][Religion] = 11;
            }
            if (listitem == 12)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Wicca");
                pInfo[playerid][Religion] = 12;
            }
            if (listitem == 13)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Unitarian Universalism");
                pInfo[playerid][Religion] = 13;
            }
            if (listitem == 14)
            {
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "Your current religion Atheist");
                pInfo[playerid][Religion] = 14;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You selected 'cancel'");
        }
    }
So here is the part of my dialog list on registration.. Just all is showing up only the last one is not showing up..

Religion dialog doesn't work...
Reply


Messages In This Thread
Need help with dialog... - by TrueForYourSelf - 20.02.2013, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)