23.03.2012, 20:09
Hello,i've this small speedcap:
But i've a problem,the speedcap works but with a little thing i need to fix. If a cop pass the 140km/h limit,he will get a wanted star.How to avoid that?
I want ONLY TEAM_CIV get's wanted stars and not TEAM_COP
Thanks.
pawn Код:
public WantedLvlSpeed()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(GetPlayerSpeed(i, true) > 140.0 && TEAM_CIV)
{
new str[150];
new plwl = GetPlayerWantedLevel(i);
plwl = GetPlayerWantedLevel(i);
SetPlayerWantedLevel(i,plwl +1);
format(str,150,"- CRIME - Speed Limit Passed! (140 km/h) - You're going at %d km/h - Wanted Level: %d",GetPlayerSpeed(i,true),plwl);
SendClientMessage(i,red,str);
return 1;
}
}
return 1;
}
But i've a problem,the speedcap works but with a little thing i need to fix. If a cop pass the 140km/h limit,he will get a wanted star.How to avoid that?
I want ONLY TEAM_CIV get's wanted stars and not TEAM_COP
Thanks.