Cop Radio
#1

Hello, I am wondering how to make a cop radio, with /r and it only works for the players in the cop team (TEAM_LAW) because I have 2 teams, And I only want the cop team to be able to see it. Thanks.
Also, I have the following code:

Код:
SetPlayerToTeamColor(playerid)
{
	if (gTeam[playerid] == TEAM_LAW)
	{
		SetPlayerColor(playerid, COLOR_LAW);
	}
	else if (gTeam[playerid] == TEAM_CRIM)
	{
		SetPlayerColor(playerid, COLOR_CRIM);
	}
}
but when I try to compile it:

(595) : warning 235: public function lacks forward declaration (symbol "SetPlayerToTeamColor")


Reply
#2

add this code somewhere in top of your script;
pawn Код:
forward SetPlayerToTeamColor(playerid);//Points out the existence of this function.
Also, if you use more than 8 if then else statements, use switch case instead.
Reply
#3

Ok, thanks it worked.

but I am wondering how to make a cop radio, with /r and it only works for the players in the cop team (TEAM_LAW) because I have 2 teams, And I only want the cop team to be able to see it. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)