SA-MP Forums Archive
attaching object above head - 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 above head (/showthread.php?tid=391740)



attaching object above head - Sam5513 - 11.11.2012

Hey guys.
Im once again in need of your help. I have been searching wikipedia for SetPlayerAttachedObject since I wanted to attach an object above players head, so I tried using to bone id 3, but instead of it placing the object above the head, it placed the object in the middle of the head. I also tried something like this:
Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerAttachedObject(playerid,0,1274,3,x,y,z+1);
but in this case the object didnt even spawn. any ideas, please?
Thank you.


Re: attaching object above head - Vince - 11.11.2012

The coordinates are relative offsets, not absolute world coordinates. In a nutshell, this means that the middle of the head has coords 0.0, 0.0, 0.0.


Re: attaching object above head - Sam5513 - 11.11.2012

Thank you for reply.
I also thought of this but I was not sure how to set the coordinate offset in that case only for coordinate z to +1. Any ideas please?