Quote:
Originally Posted by rjjj
You can make it using loops and functions do check and get coordinates .
I did it .
pawn Код:
stock IsPlayerInRangeOfVehicleModel(playerid, Float:range, vehiclemodel) { new Float:VehiclePos[3]; for(new x; x != MAX_VEHICLES; x++) { GetVehiclePos(x,VehiclePos[0],VehiclePos[1],VehiclePos[2]); if((GetVehicleModel(x) == vehiclemodel) && IsPlayerInRangeOfPoint(playerid, range, VehiclePos[0],VehiclePos[1],VehiclePos[2])) { return true; } } return false; }
So, you can use like this:
Код:
if(IsPlayerInRangeOfVehicleModel(playerid, 10.0, 596))
To police cars .
I hope that i have helped .
|
Thankyou. You helped alot.
It works perfect.