Function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Function (
/showthread.php?tid=247413)
Function -
iJumbo - 09.04.2011
Is a function to detect if any car is in range of one point? i dont found any
like IsAnyCarInRangeOfPoint
Re: Function -
CrazyBlob - 09.04.2011
not sure you could do something like this
Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, cords))
{
if(IsPlayerInVehicle(playerid, yourvehicleid))
{
//Blah If Their In The Car
}
}
Re: Function -
iJumbo - 09.04.2011
not if is player in range wit ha vehicle if is one vehicle in range of some point vehicle with no one
Re: Function -
CrazyBlob - 09.04.2011
ohh i see uhm not a clue sorry ;P
Re: Function -
Sascha - 09.04.2011
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;
}
Re: Function -
iJumbo - 09.04.2011
i solve it ... and i say not a vehicleid .. if ANY of all vehicle spawned is in point ... anyway solved