SetPlayerAttachedObject - 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: SetPlayerAttachedObject (
/showthread.php?tid=475803)
SetPlayerAttachedObject -
Derryd - 15.11.2013
How do you make it so the object turns with the players head?
For example, my player has sun glasses attached and they remain in the same position when my characters head turns.
Thanks
Re: SetPlayerAttachedObject -
s0nic - 15.11.2013
Attach it to the head's bone
https://sampwiki.blast.hk/wiki/Bone_IDs
Re: SetPlayerAttachedObject -
Derryd - 16.11.2013
s0nic your still scripting SA-MP?
It's Josh from vG
Re: SetPlayerAttachedObject -
Beckett - 16.11.2013
Simply change the bone.
Код:
SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ, materialcolor1, materialcolor2)