[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(playerid, 3, 19487, 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, COLOR_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(playerid, 3, 18927, 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, COLOR_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 loadfilterscript, and you will be able to create your own attachments in a matter of seconds.
Greetings.