Jump to content

A new function for object to bone attaching?


Gobe

Recommended Posts

Hello.

Well I've suggested this many times I know (i'm annoying) but I think the getPedBonePosition function has limits, it would be better in my opinion having the same function as the .scm original gta sa's script, it would be like attachElementToPedBone and attachElementToPedBoneOFFSETS because, it would allow scripters to attach anything they want to the player's bone (Well I've seen SA-MP done that with SpecialActions but their function isn't generic, you can just attach bottles and a cig/joint) + with offsets we could attach burgers, pizzas, wallets, cellphones... to player's hand etc. I think (if I'm wrong i'd like to know how to do) this is not possible right now with the single function we got.

Well I hope you guys will think about this, sorry for my English it's 4.41 am here and i didn't sleep (lol) and if you can actually do that, I'd be damn happy :D. Thanks for your attention.

Link to comment
  • 2 weeks later...

Hi Gobe,

I was actually looking for this function too. I was suprised this function wasn't there, I already made a custom model to attach to a bone. I tried to make a script to replace the function, but it isn't possible (well, with limited functions). It would be very nice if this function gets implemented into the next version. Anyway, the script I made got the bone position and the rotation of the player. Then it put the object at that position/rotation. It's very buggy, when you crouch the object doesn't move with the bone and when you walk forward you get the same problem. It doesn't refresh fast enough, but when he e.g. moves his head the object doesn't rotate too. So it isn't possible to imitate very well.

I also tried rigging my model to a ped, but then I saw that it wasn't possible to replace a ped model :roll:. So I think the only way is waiting...

Link to comment
Anyway, the script I made got the bone position and the rotation of the player. Then it put the object at that position/rotation. It's very buggy, when you crouch the object doesn't move with the bone and when you walk forward you get the same problem..

What exactly do you mean with "move with the bone"?

It doesn't refresh fast enough,

What are you using? setTimer or onClientRender? onClientPreRender should work fine.

but when he e.g. moves his head the object doesn't rotate too. So it isn't possible to imitate very well.

You just need to take the rotation into account and calculate a little with it, if you don't already do that.

Can you perhaps post the script you made? Plenty of people around who can help look for ways to improve your script.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...