Dialog shows every time on death
#7

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_CLASS) {
        if(!response) // if player presses ESC re-show the dialog
            return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Class 1\nClass 2\nClass 3", "Choose", "");
        switch(listitem) {
            case 0:
            {
                if(gTeam[playerid] == TEAM_USA) {
                    SendClientMessage(playerid, COLOR_BLUE, "*You chose the Soldier Class!");
                    GivePlayerWeapon(playerid, 4, 0);
                    GivePlayerWeapon(playerid, 22, 25);
                    GivePlayerWeapon(playerid, 16, 2);
                    GivePlayerWeapon(playerid, 31, 100);
                    ShowPlayerDialog(...) // USA's Info
                }
                else if(gTeam[playerid] == TEAM_USA) {
                    SendClientMessage(playerid, COLOR_BLUE, "*You chose the Soldier Class!");
                    GivePlayerWeapon(playerid, 4, 0);
                    GivePlayerWeapon(playerid, 22, 25);
                    GivePlayerWeapon(playerid, 16, 2);
                    GivePlayerWeapon(playerid, 31, 100);
                    ShowPlayerDialog(...) // USA's Info
                }
                else if(gTeam[playerid] == TEAM_USA) {
                    SendClientMessage(playerid, COLOR_BLUE, "*You chose the Soldier Class!");
                    GivePlayerWeapon(playerid, 4, 0);
                    GivePlayerWeapon(playerid, 22, 25);
                    GivePlayerWeapon(playerid, 16, 2);
                    GivePlayerWeapon(playerid, 31, 100);
                }
            }
            case 1:
            {
                // if(gTeam[playerid] == x) {
                    SendClientMessage(playerid, COLOR_BLUE, "*you choose the soldier class..");
                    GivePlayerWeapon(playerid, 34, 12);
                    GivePlayerWeapon(playerid, 23, 25);
                    GivePlayerWeapon(playerid, 25, 15);
                    ShowPlayerDialog(...) // x's Info
                }
            }
            case 2: // CLASS 3
            {
                // if(gTeam[playerid] == y) {
                    ShowPlayerDialog(...) //  y's Info
                }
            }// stuff for class 3
        }// etc
    }
    return 0;
}
Reply


Messages In This Thread
Dialog shows every time on death - by MSI - 20.01.2012, 15:03
Re: Dialog shows every time on death - by Chris White - 20.01.2012, 15:11
Re: Dialog shows every time on death - by [XST]O_x - 20.01.2012, 15:20
Re: Dialog shows every time on death - by Konstantinos - 20.01.2012, 15:28
Re: Dialog shows every time on death - by MSI - 20.01.2012, 15:55
Re: Dialog shows every time on death - by MSI - 20.01.2012, 16:05
Re: Dialog shows every time on death - by Konstantinos - 20.01.2012, 16:10
Re: Dialog shows every time on death - by MSI - 20.01.2012, 16:12
Re: Dialog shows every time on death - by MSI - 20.01.2012, 16:44
Re: Dialog shows every time on death - by Konstantinos - 20.01.2012, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)