OnDialogResponse
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new sendername[MAX_PLAYER_NAME];
    new string[128];

    if(RegistrationStep[playerid] != 0)
    {
        if(dialogid == REGISTERSEX)
        {
            if(response)
            {
                new stringdiag[410];
                for(new x=18;x<99;x++)
                {
                    format(stringdiag, sizeof(stringdiag), "%s%d\n", stringdiag, x);
                }
                if(listitem == 0)
                {
                    PlayerInfo[playerid][pSex] = 1;
                    SendClientMessageEx(playerid, COLOR_LIGHTRED, "Alright, so you're a male.");
                    ShowPlayerDialog(playerid, REGISTERAGE, DIALOG_STYLE_LIST, "{33CCFF}What is your characters age? - Comming soon!", stringdiag, "Submit", "");
                    RegistrationStep[playerid] = 2;
                }
                else
                {
                    PlayerInfo[playerid][pSex] = 2;
                    SendClientMessageEx(playerid, COLOR_LIGHTRED, "Alright, so you're a female.");
                    ShowPlayerDialog(playerid, REGISTERAGE, DIALOG_STYLE_LIST, "{33CCFF}What is your characters age? - Comming Soon!", stringdiag, "Submit", "");
                    RegistrationStep[playerid] = 2;
                }
            }
            else
            {
                ShowPlayerDialog(playerid, REGISTERSEX, DIALOG_STYLE_LIST, "{33CCFF}Is your character male or female? - wComming soon!", "Male\nFemale", "Submit", "");
            }
        }
        else if(dialogid == REGISTERAGE)
        {
            if(response)
            {
                new stringdiag2[410];
                for(new x=1;x<11;x++)
                {
                    format(stringdiag2, sizeof(stringdiag2), "%s%d\n", stringdiag2, x);
                }
                PlayerInfo[playerid][pAge] = listitem+18;
                PlayerInfo[playerid][pOrigin] = 0;
                format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
                SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
                ShowPlayerDialog(playerid, REGISTERSKILL, DIALOG_STYLE_LIST, "{33CCFF}What roleplay skill level do you believe you have?", stringdiag2, "Submit", "");
                RegistrationStep[playerid] = 3;
            }
            else
            {
                ShowPlayerDialog(playerid, REGISTERAGE, DIALOG_STYLE_LIST, "{33CCFF}What is your characters age? - Comming Soon!", string, "Submit", "");
            }
        }
        else if(dialogid == REGISTERSKILL)
        {
            if(response)
            {
                    PlayerInfo[playerid][pRPSkill] = listitem+1;
                    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Thanks for registering at Millenium, you are now proceeding to the next part in registration!");
                    RegistrationStep[playerid] = 0;

                    hidePlayerDialog(playerid);

                    ShowPlayerDialog(playerid, DIALOG_QUIZ, DIALOG_STYLE_LIST, "{33CCFF}What is roleplay in SA-MP?", "A type of gamemode where you realistically act out a character\nAn STD\nA track by Jay-Z\nA type of gamemode where you just kill people", "Select", "");
            }
            else
            {
                ShowPlayerDialog(playerid, REGISTERSKILL, DIALOG_STYLE_LIST, "{33CCFF}What roleplay skill level do you believe you have?", string, "Submit", "");
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnDialogResponse - by MrCallum - 23.09.2014, 15:00
Re: OnDialogResponse - by iSkate - 23.09.2014, 15:05
Re: OnDialogResponse - by XStormiest - 23.09.2014, 16:54
Re: OnDialogResponse - by DTV - 25.09.2014, 02:26

Forum Jump:


Users browsing this thread: 2 Guest(s)