27.06.2013, 16:37
pawn Код:
CMD:r(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /r [text] to talk in team radio");
new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name));
new string[128];
format(string, sizeof(string), "[Team Radio]%s[%d]: %s",Name,playerid, params[0]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid])
{
SendClientMessage(i, COLOR_LGREEN, string);
}
}
return 1;
}