27.10.2011, 20:20
I use something similar:
Then for your message when the robber robs the bank, for example:
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;
}
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);

