09.04.2011, 10:42
Is a function to detect if any car is in range of one point? i dont found any
like IsAnyCarInRangeOfPoint
like IsAnyCarInRangeOfPoint
if(IsPlayerInRangeOfPoint(playerid, 7.0, cords)) { if(IsPlayerInVehicle(playerid, yourvehicleid)) { //Blah If Their In The Car } }
stock IsVehicleInRangeOfPoint(vehicleid, Float:range, Float:x, Float:y, Float:z)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
if((x <= x + range && x >= x - range) && (y <= y + range && y >= y - range) && (z <= z + range && z >= z - range)) return 1;
return 0;
}