Function
#1

Is a function to detect if any car is in range of one point? i dont found any

like IsAnyCarInRangeOfPoint
Reply
#2

not sure you could do something like this


Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, cords))
    {
         if(IsPlayerInVehicle(playerid, yourvehicleid))
        {
                 //Blah If Their In The Car
         }
}
Reply
#3

not if is player in range wit ha vehicle if is one vehicle in range of some point vehicle with no one
Reply
#4

ohh i see uhm not a clue sorry ;P
Reply
#5

maybe something like this:
(no clue if it works, though)
pawn Код:
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;
}
Reply
#6

i solve it ... and i say not a vehicleid .. if ANY of all vehicle spawned is in point ... anyway solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)