27.07.2012, 14:14
Try this
if this is not what you mean then sorry i didn't completely understand you.
pawn Код:
CMD:ar(playerid, params[])
{
if(PlayerInfo[playerid][Radio] < 1)
{
if(gTeam[playerid] == TEAM_POLICE)
{
new string[100], pname[24];
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ar [msg]");
GetPlayerName(playerid, pname, 24);
format(string, sizeof(string), "** %s [%d] At [A-F Radio]: %s",pname,playerid,params);
printf("%s", string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) if(gTeam[i] == TEAM_POLICE) SendClientMessage(i, COLOR_WHITE, string);
}
}
else SendClientMessage(playerid, COLOR_RED, "Only The Airforce Can Use This Radio!");
return 1;
}