lolek123 Posted August 17, 2012 Posted August 17, 2012 Hi. How can I attach object to players hands only, and make it move together with them during an animation, that involves hand movement?
Castillo Posted August 17, 2012 Posted August 17, 2012 You can use the "bone attachments": https://community.multitheftauto.com/ind ... ls&id=2540 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
KenXeiko Posted August 17, 2012 Posted August 17, 2012 I tried it couple weeks ago to attach fire to ped's head, working well ... Multi Theft Auto: San Andreas - DM/DD Race Server Multi Theft Auto: San Andreas - Freeroam Server (WIP) Wolfenstein: Enemy Territory Server Mafia II Multiplayer Server More Insane-Players Server
Castillo Posted August 17, 2012 Posted August 17, 2012 Would that work on MTA:SA 1.3 or 1.4? Yes, it's working on current release version. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
lolek123 Posted August 17, 2012 Author Posted August 17, 2012 Do you think that this funcition will be added to MTA?
Castillo Posted August 17, 2012 Posted August 17, 2012 Since it's already possible to do it via scripting, I doubt it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Termycraft Posted August 18, 2012 Posted August 18, 2012 I hope they will add a function named 'attachElementToPedBone', or a similar thing, it will simplify scripting to everyone
DiSaMe Posted August 18, 2012 Posted August 18, 2012 What's not simple? Downloading a resource? If it's hard, then scripting is going to be difficult for you anyway and there's nothing to simplify. -
Moderators IIYAMA Posted August 18, 2012 Moderators Posted August 18, 2012 https://wiki.multitheftauto.com/wiki/GetPedBonePosition https://wiki.multitheftauto.com/wiki/AttachElements Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
lolek123 Posted August 19, 2012 Author Posted August 19, 2012 function attachDumb(thePlayer, command) createdDumb = createObject(2916, 0,0,0) bonePos = getPedBonePosition(thePlayer, 25) attachElements(createdDumb, thePlayer, bonePos) setPedAnimation(thePlayer, "gym", "gym_free_pickup") end addCommandHandler("dumb", attachDumb) Can you tell me what's wrong with this? It shows "attempt to call global 'getPedBonePosition' (a nil value)".
Castillo Posted August 19, 2012 Posted August 19, 2012 getPedBonePosition is a client side only function. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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