14.04.2010, 19:37
How do i send a messege from like,
TEAM_CIV,TEAM_POLICE?
Kinda like a 911 call.
TEAM_CIV,TEAM_POLICE?
Kinda like a 911 call.
for(new a=0; a<MAX_PLAYERS; a++)
{
if(GetPlayerTeam(a) == TEAM_POLICE)
{
SendClientMessage(a,COLOR_BLUE,"Radio: Suspect down, Over.")
}
}

if(strcmp(cmd, "/sudown", true) == 0) {
if GetPlayerTeam(playerid, TEAM_POLICE) {
for(new a=0; a<MAX_PLAYERS; a++)
{
if(GetPlayerTeam(a) == TEAM_POLICE)
{
SendClientMessage(a,COLOR_BLUE,"Radio: Suspect down, Over.") // Define color if u dont have
}
}
}else{
SendClientMessage(a,COLOR_RED,"You are not a cop") // Define color if u dont have
return 1;
}
stock SendMessageToTeam( team, color, message[] )
{
for(new cC; cC < MAX_PLAYERS; cC++)
{
if(!IsPlayerConnected(cC)) continue;
if(GetPlayerTeam(cC) != team) continue;
SendClientMessage(cC, color, message);
}
}
// Example usage:
SendMessageToTeam( TEAM_COPS, COLOR_BLUE, "Oh my bawls, emergency!");