SA-MP Forums Archive
Attaching object offsets - 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: Attaching object offsets (/showthread.php?tid=624563)



Attaching object offsets - PeanutButter - 18.12.2016

Hello,

I am working on an inventory system and I was wondering how I could attach objects to a player without them always having to adjust the position manually
and without me having to save the offsets for every object.

PHP код:
AttachObjectToPlayer(objectidplayeridFloat:OffsetXFloat:OffsetYFloat:OffsetZFloat:rXFloat:rYFloat:rZ
PHP код:
SetPlayerAttachedObject(playeridindexmodelidboneFloat:fOffsetXFloat:fOffsetYFloat:fOffsetZFloat:fRotXFloat:fRotYFloat:fRotZFloat:fScaleXFloat:fScaleYFloat:fScaleZmaterialcolor1materialcolor2
What's the best way to realistically attach an object to a player?


Re: Attaching object offsets - ISmokezU - 18.12.2016

Second one.


Re: Attaching object offsets - PeanutButter - 18.12.2016

Okay, but how do I know the offsets?