15.01.2012, 16:12
PHP код:
forward SendLAWMessage(color,const string[]);
public SendLAWMessage(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][Fmember] < 1 || PlayerInfo[i][Fleader] < 1)
SendClientMessage(i, TEAM_RADIO_COLOR,string);
}
return 1;
}
CMD:r( playerid, params[ ] )
{
if(PlayerInfo[i][Fmember] < 1 || PlayerInfo[i][Fleader] < 1)) return 0;
new string[258];
if( sscanf(params,"u", string ) ) return SendClientMessage(playerid, COLOR_RED, "USAGE: /r [Text]");
new name[MAX_PLAYER_NAME], string[258];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s (radio): %s , Over.", name, params);
SendLAWMessage(TEAM_RADIO_COLOR, string);
return 1;
}