13.07.2015, 09:45
PHP код:
public wantedcolor()
{
new wl,c;
for(new d,g=GetMaxPlayers(); d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d))
{
wl=GetPlayerWantedLevel(d);
if(wl == 0 && gTeam[d] == CIVILIANS)
{
c = GetPlayerColor(d);
if(c != BLANCO)
SetPlayerColor(d,BLANCO);
}
if(wl >= 1 && wl <= 3)
{
c = GetPlayerColor(d);
if(c != AMARILLO)
SetPlayerColor(d,AMARILLO);
}
if(wl >= 4)
{
c = GetPlayerColor(d);
if(c != ROJO)
SetPlayerColor(d,ROJO);
}
}
else if(pData[d][pAdmin] == 1 && IsOnduty{d} == 1 && wl == 0)
{
c = GetPlayerColor(d);
SetPlayerColor(d,COLOR_ADMIN);
return 1;
}
return 1;
}