SendClientMessageToAllCops [rep+]
#2

I use something similar:

pawn Код:
// bottom of script

stock FindTeam(playerid)
{
    new Team = GetPVarInt(playerid,"Team");
    return Team;
}

// bottom of script

forward MessageToCops(color,const string[]);
public MessageToCops(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new Team = FindTeam(i);
       
        if(IsPlayerConnected(i))
        {
            if(Team == TEAM_COPS)
            {
                SendClientMessage(i,color,string);
            }
        }
    }
    return 1;
}
Then for your message when the robber robs the bank, for example:

pawn Код:
new string[128], name[24]; // name will be the robbers name
GetPlayerName(playerid,name,24);

format(string,128,"Attention All Units!  The Bank In Las Venturas Has Been Robbed By %s!",name);
MessageToCops(your_color,string);
Reply


Messages In This Thread
SendClientMessageToAllCops [rep+] - by Chriham3 - 27.10.2011, 20:12
Re: SendClientMessageToAllCops [rep+] - by grand.Theft.Otto - 27.10.2011, 20:20
Re: SendClientMessageToAllCops [rep+] - by Biesmen - 27.10.2011, 20:29
Re: SendClientMessageToAllCops [rep+] - by Chriham3 - 27.10.2011, 20:44
Re: SendClientMessageToAllCops [rep+] - by [MWR]Blood - 27.10.2011, 20:51
Re: SendClientMessageToAllCops [rep+] - by .:Kaos:. - 27.10.2011, 20:57
Re: SendClientMessageToAllCops [rep+] - by Biesmen - 28.10.2011, 14:12
Re: SendClientMessageToAllCops [rep+] - by Wesley221 - 28.10.2011, 14:13
Re: SendClientMessageToAllCops [rep+] - by SloProKiller - 28.10.2011, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)