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
KenXeiko Posted August 17, 2012 Posted August 17, 2012 I tried it couple weeks ago to attach fire to ped's head, working well ...
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.
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.
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
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.
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