SA-MP Forums Archive
[Help] AttachObjectToPlayer Error - 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: [Help] AttachObjectToPlayer Error (/showthread.php?tid=553288)



[Help] AttachObjectToPlayer Error - Arxalan - 29.12.2014

Hello , i want to make Objects in my gamemodes then i search it on ****** i found its wiki page there was an example :

PHP код:
CMD:hat1(playerid params[])
{
     
SetPlayerAttachedObject(playerid31948720.101, -0.00.05.5084.6083.7111COLOR_GREY);
     
retun 1;

I Copied it and tested and it works fine . Then i decided to make my own . So i made the following command

PHP код:
CMD:hat2(playerid params[])
{
     
SetPlayerAttachedObject(playerid31892720.101, -0.00.05.5084.6083.7111COLOR_GREY);
     return 
1;

As you Can see both have Axis . hat1 is for HAT1 and hat2 is for HAT2 . But hat1 appears correctly but hat2 dont it is half in the player head (lol) and half appears . Moreover , it isn't in correct direction.


Re: [Help] AttachObjectToPlayer Error - marwanalramahi - 29.12.2014

You should edit the hat position to fit the skin you are using.


Re: [Help] AttachObjectToPlayer Error - Arxalan - 29.12.2014

How can i ? I mean how can i give the exact axis . How will i know that this axis will be accurate on the skin?


Re: [Help] AttachObjectToPlayer Error - LetsOWN[PL] - 29.12.2014

Quote:
Originally Posted by Arxalan
Посмотреть сообщение
How can i ? I mean how can i give the exact axis . How will i know that this axis will be accurate on the skin?

SA-MP provides filterscript, which is able to do it. Just load
Код:
attachments.amx
filterscript, and you will be able to create your own attachments in a matter of seconds.

Greetings.