SA-MP Forums Archive
Forklift fork - 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: Forklift fork (/showthread.php?tid=524427)



Forklift fork - Eloctro - 06.07.2014

good evening,
Looking for a solution to find the height of the Forklift fork.
Thanks.


Re: Forklift fork - AMouldyLemon - 06.07.2014

The height?


Re : Forklift fork - Eloctro - 06.07.2014

Yes, when you press "8" ou "2" the fork up and down. And i want to know the position of the fork


Re : Forklift fork - S4t3K - 06.07.2014

The best way is to create an object InGame at your position.

Then use EditObject to put the object on the fork.
Finally, use AttachObjectToVehicle.

Now, when you'll want to get the fork position, simply get the object position instead.
And if you want it as an offset, simply deduct the object position from the player/vehicle position (basically, the center of the vehicle I think).