23.03.2014, 12:14
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DTEAMS)
{
if(!response) return ShowPlayerDialog(playerid, DTEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
if(response)
{
switch(listitem)
{
case 0:
{
gTeam[playerid] = ARMY_TEAM;
SetPlayerTeam(playerid, 0);
SetPlayerPos(playerid, 203.51, 1861.86, 13.14);
SetPlayerSkin(playerid, 287);
SetPlayerColor(playerid, A_COLOR);
SendClientMessage(playerid, COLOR_USA, "[Army]: You have chosen Army Team.");
SendClientMessageToAll(COLOR_USA, "[Army]: Player %s has joined Army Team !");
SpawnPlayer(playerid);
}
case 1:
{
gTeam[playerid] = TERROR_TEAM;
SetPlayerPos(playerid, 268.80, 1883.47, -30.09);
SetPlayerSkin(playerid, 16);
SetPlayerColor(playerid, T_COLOR);
SetPlayerTeam(playerid, 1);
SendClientMessage(playerid, COLOR_RED, "[Terrorist]: You have chosen Terrorist Team.");
SendClientMessageToAll(COLOR_RED, "[Terrorist]: Player %s has joined Terrorist Team !");
SpawnPlayer(playerid);
}
}
}
}
return 1;
}