Teams Dialogs
#3

This is not a script request thread. However this is more than simple. Just create a normal dialog and list all teams inside, show it on OnPlayerRequestClass and on OnDialogResponse handle the team setting.

pawn Код:
ShowPlayerDialog(playerid, YOUR_DIALOG_ID, DIALOG_STYLE_LIST, "Team Selection", "Team 1\nTeam 2\nTeam3", "Select", "Close");
OnDialogResponse:

pawn Код:
switch(dialogid)
{
    case YOUR_DIALOG_ID:
    {
            if(!response) return 1;

            switch(listitem)
            {
                case 0: gTeam[playerid] = TEAM_ONE;
                case 1: gTeam[playerid] = TEAM_TWO;
                case 2: gTeam[playerid] = TEAM_THREE;
            }
    }
}
OnPlayerSpawn:

pawn Код:
SetPlayerToTeamColor(playerid);
Reply


Messages In This Thread
Teams Dialogs - by Mohaowmad - 15.03.2019, 07:22
Re: Teams Dialogs - by Mohaowmad - 15.03.2019, 08:22
Re: Teams Dialogs - by SymonClash - 15.03.2019, 09:13

Forum Jump:


Users browsing this thread: 2 Guest(s)