team select
#7

Here you go

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    SendClientMessage(playerid, -1, "You have choosen the Team Rangers");
                    gTeam[playerid] = 1; // You use gTeam?
                }
                case 1:
                {
                    SendClientMessage(playerid, -1, "You have choosen the Team Spetsnaz");
                    gTeam[playerid] = 2;
                }
            }
        }
        else if(!response) return SendClientMessage(playerid, -1, "You have to choose a team !") && ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
    }
    return 0;
}
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
    return 1;
}
Don't take the dialog under OnPlayerSpawn because then this dialog will pop up all the time when a player spawns, OnPlayerRequestSpawn is only used when they press "Spawn" buttom in class selection

Enjoy

EDIT: CrazyBlob & Seven_of_Nine stop being such dicks.. Help the guy out..
Reply


Messages In This Thread
team select - by muhib777 - 23.04.2011, 13:24
Re: team select - by muhib777 - 23.04.2011, 14:10
Re: team select - by CrazyBlob - 23.04.2011, 14:23
Re: team select - by Seven_of_Nine - 23.04.2011, 14:25
Re: team select - by muhib777 - 23.04.2011, 14:44
Re: team select - by Seven_of_Nine - 23.04.2011, 14:47
Re: team select - by xir - 23.04.2011, 14:47
Re: team select - by muhib777 - 23.04.2011, 21:40
Re: team select - by xir - 23.04.2011, 21:46

Forum Jump:


Users browsing this thread: 1 Guest(s)