Cop Radio - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Cop Radio (
/showthread.php?tid=145309)
Cop Radio -
DDodo - 01.05.2010
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")
Re: Cop Radio -
maij - 01.05.2010
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.
Re: Cop Radio -
DDodo - 02.05.2010
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.