05.10.2013, 23:49
pawn Код:
#define TEAM_COP 1
forward SendClientMessageToAllCops(msg[]);
new gTeam[MAX_PLAYERS];
new HasLawEnforcementRadio[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid,classid);
SetPlayerTeamFromClass(playerid,classid)
{
if(GetPlayerSkin(playerid) == skin || GetPlayerSkin(playerid) == skin)
{
gTeam[playerid] = TEAM_COP;
}
}
}
OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_COP)
{
HasLawEnforcementRadio[playerid] =1;
}
}
public SendClientMessageToAllCops(msg[])
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(HasLawEnforcementRadio[i] == 1)
{
SendClientMessage(i,Anycolor you want,msg);
}
}
}
}
btw i will give you gift:
if you don't want them to kill each other
put this
pawn Код:
SetPlayerTeam(playerid,team id);
pawn Код:
HasLawEnforcementRadio[playerid] =1;