Object position
#1

Hey guys, how can I check if a player is near a defined object, I don't mean by the cooordinates where it's been placed in a mapping tool but actually like you can use it to load the object on a forklift.
Here is an example
pawn Code:
Object[1] = CreateDynamicObject...

CMD:forklift[etc..
Reply
#2

PHP Code:
new Float:x,Float:y,Float:z;
GetDynamicObjectPos(Object[1],x,y,z);
if(if(
IsPlayerInRangeOfPoint(i,1,xy,z)){
//Object near the player

Reply
#3

That was exactly what I was looking for, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)