15.03.2019, 09:13
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.
OnDialogResponse:
OnPlayerSpawn:
pawn Код:
ShowPlayerDialog(playerid, YOUR_DIALOG_ID, DIALOG_STYLE_LIST, "Team Selection", "Team 1\nTeam 2\nTeam3", "Select", "Close");
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;
}
}
}
pawn Код:
SetPlayerToTeamColor(playerid);