What Function Can I Use To... - 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)
+--- Thread: What Function Can I Use To... (
/showthread.php?tid=299694)
What Function Can I Use To... -
English-Conceptz - 27.11.2011
what function or code can i use to check if a player with an object attached to him/herself is within a certain range of a vehicle ?
example: player goes to object picks it up, walks over to car and when they get within a certain distance of the car the object gets dettached or destroyed as if it has been put into the car.
Re: What Function Can I Use To... - [L3th4l] - 27.11.2011
pawn Код:
if(IsPlayerInRangeOfPoint(playerid_with_attached_object, range, car_x, car_y, car_z))
{
// The player is near the vehicle
}
More info:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint