08.09.2012, 14:27
Here you go:
pawn Код:
forward WantedLevelColor(playerid);
public WantedLevelColor(playerid) {
new wanted = GetPlayerWantedLevel(playerid);
if(wanted == 6)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(wanted == 5)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(wanted == 4)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(wanted == 3)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(wanted == 2)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(wanted == 1)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(wanted == 0)
{
SetPlayerToTeamColor(playerid);
}
return true;
}
public OnPlayerUpdate(playerid)
{
WantedLevelColor(playerid);
return true;
}