PDA

View Full Version : SetPlayerAttachedObject


Derryd
15/11/2013, 07:08 AM
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

s0nic
15/11/2013, 08:11 AM
Attach it to the head's bone
http://wiki.sa-mp.com/wiki/Bone_IDs

Derryd
16/11/2013, 12:53 AM
s0nic your still scripting SA-MP?

It's Josh from vG

Beckett
16/11/2013, 07:02 AM
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)