Clipper_ Posted December 11, 2017 Posted December 11, 2017 For Christmas I want to create a script which adds a Santa Hat on the head of the local player by a command. During the development, I had 2 ideas: 1. Replacing the model of an existing Hat cloth is impossible and leads to a game crash. MTA seem to not have support for clothes ID, only for texture replacement. 2. Positioning another small object (with replaced texture and model) on top of the player's head is another solution. Here, the problem is the position where the hat should be placed: getting the coordonates of the highest "bone" of the ped with getPedBonePosition leads to small changes through the vales, so the hat is not moving with the head like it should behave. If you have a solution for getting the position of any body part (in this case the head), it will be a big help I will comment with the code if needed.
itHyperoX Posted December 11, 2017 Posted December 11, 2017 (edited) replace it with 1 object createObject, attachObject, setObjectSize, Edited December 11, 2017 by TheMOG
Mahlukat Posted December 12, 2017 Posted December 12, 2017 You can check this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14125
DRW Posted December 12, 2017 Posted December 12, 2017 Use bone_attach's exported functions. https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540 Proud owner and developer of ZNEXT: Aftermath. Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience. Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. Español, Pусский, Türk, عربى, Polski, Português IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now