[help]SetPlayerAttachedObject Rotation
#1

im trying to make a /mask command
although not like others.. i want to actually attach a mask object to the player
not just hide the player name ect..

so what i got works but!!!
i have no ideal how to get the correct x,y,z rotation to line up the mask to the player.
its not even close with default values.

this is what i have, i have messed with all the rotation values and cant even get close.


pawn Код:
if(IsPlayerAttachedObjectSlotUsed(playerid, 9)) {
    RemovePlayerAttachedObject(playerid, 9);
}else{
    SetPlayerAttachedObject(playerid, 9, 19036, 2, 0.0, 0.05, 0.0, 0.0, 0.0, 1.34);
}
is there an easy way todo this?
or maybe someone has done it with other mask
and already know the rotations.
If someone could get me close to the correct rotation
then i could modify it for all the mask i want to use..

my only way is to change a value, recompile and reconnect.
Reply
#2

In sa-mp 0.3e there's a tool that allows you to easily edit objects. So if you need to get the position, you should probably download the 0.3e server package and client. The 0.3e server package also comes with a new filterscript called "attachments" which contains the basic functions to create and edit attached objects.

Also note; you can't use the same position and rotation for all skins, as some skins are higher than others.
Reply
#3

Yeah I guess i could install that.
I was gonna wait till a final release of it was out.
Otherwise i have to update my client too and wont have
a 0.3d compatible client anymore .

and im aware of the issue with the skins,
this is why i ask for someone to get me close and i could adjust from there,
I got an array with ALL skins names, gender ect..
I could add the mask offsets to this.



thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)