23.07.2018, 15:34
Because you didn't define who's the target...
You should loop through all the players, then check if they are near the cop, and if they are also 4+ wanted level ,Then you can proceed to the code.. So instead of doing it like "new targetid;", do it like..
I guess this would do it, Not perfectly, but good enough..
You should loop through all the players, then check if they are near the cop, and if they are also 4+ wanted level ,Then you can proceed to the code.. So instead of doing it like "new targetid;", do it like..
PHP код:
foreach(new targetid : Player)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(targetid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 10, X, Y, Z)
{
//Put your whole arrest code here..
}
else return 0;
}