04.02.2013, 09:59
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_TDM:
{
switch(listitem)
{
case 0:
{
ResetPlayerWeapons(playerid);
BlueTeam{playerid} = true;
TDM[BluePlayers]++;
SetPlayerTeam(playerid, TeamBlue);
new rand = random(sizeof BluePos);
SetPlayerPos(playerid, BluePos[rand][0], BluePos[rand][1], BluePos[rand][2]);
SetPlayerFacingAngle(playerid, BluePos[rand][3]);
ShowPlayerDialog(playerid, DIALOG_TDM1, DIALOG_STYLE_LIST, "Team Death Match [TDM] - "blue"Blue Team", ""blue"Uzi, Tec-9, MP5 and 9mm\nM4, Combat Shotgun, AK-47 and Silenced 9mm\nSniper, Desert Eagle and Grenade", "Ok", "Cancel");
}
case 1:
{
ResetPlayerWeapons(playerid);
RedTeam{playerid} = true;
TDM[RedPlayers]++;
SetPlayerTeam(playerid, TeamRed);
new rand = random(sizeof RedPos);
SetPlayerPos(playerid, RedPos[rand][0], RedPos[rand][1], RedPos[rand][2]);
SetPlayerFacingAngle(playerid, RedPos[rand][3]);
ShowPlayerDialog(playerid, DIALOG_TDM1, DIALOG_STYLE_LIST, "Team Death Match [TDM] - "red"Red Team", ""red"Uzi, Tec-9, MP5 and 9mm\nM4, Combat Shotgun, AK-47 and Silenced 9mm\nSniper, Desert Eagle and Grenade", "Ok", "Cancel");
}
}
return true;
}
case DIALOG_TDM1:
{
switch(listitem)
{
case 0:
{
Guns{playerid} = 0;
GivePlayerWeapon(playerid, 28, 900);
GivePlayerWeapon(playerid, 32, 900);
GivePlayerWeapon(playerid, 29, 900);
GivePlayerWeapon(playerid, 22, 900);
}
case 1:
{
Guns{playerid} = 1;
GivePlayerWeapon(playerid, 31, 900);
GivePlayerWeapon(playerid, 27, 900);
GivePlayerWeapon(playerid, 30, 900);
GivePlayerWeapon(playerid, 23, 900);
}
case 2:
{
Guns{playerid} = 2;
GivePlayerWeapon(playerid, 34, 900);
GivePlayerWeapon(playerid, 24, 900);
GivePlayerWeapon(playerid, 16, 900);
}
}
return 1;
}
}
return 1;
}