Jump to page content
English English  Polish Polish  Dutch Dutch  Russian Russian  German German  Hungarian Hungarian  Norwegian Norwegian  Swedish Swedish  Finnish Finnish  Romanian Romanian  Spanish Spanish  Portuguese Portuguese  Latvian Latvian 


rssBone attachments (bone_attach)

Rate:You need to be logged in to vote
Rating:3.9 (70 Votes)
STAFF NOTE: This script is extremely unoptimized and can therefore cause lag on slower PC's. We advise you to use this newly released alternative instead: https://community.mtasa.com/?p=resources&s=details&id=18389
(also read https://forum.mtasa.com/topic/129019-rel-pattach-optimized..ne-attach/ to see performance comparisons)

Only use if you have no other choice for compatibility reasons

This resource can attach elements to bones. Resource video: http://www.youtube.com/watch?v=wkRmUzOco80 . The script has only been tested on MTA SA 1.1. It should work on 1.0.5 too, but non-object elements will have incorrect rotation. Also, because of the way getPedBonePosition works, attached elements will have incorrect positions when the ped/player is walking on a sloped surface.

Function descriptions and bone IDs can be found in functions.txt in the resource.

Resource usage example:

ped = createPed(105,0,0,3)
burger = createObject(2880,0,0,0)

This example creates the ped at the center of the map and attaches the burger to the right hand.

Have fun scripting!


Download latest version | Report

Version history

Version Publish Date Changes
1.3.0 2017-07-18 23:14:00 Fixed client lag due to NaN debug spam (as it hurts MTA stability, staff decision to patch) Download
1.2.0 2011-07-22 12:05:15 Added setElementBonePositionOffset and setElementBoneRotationOffset. Download
1.1.0 2011-07-21 17:02:52 Fixed spine rotation (now works as well as other bones do).
3 new functions.
Functions description file included in the resource.
1.0.1 2011-07-19 15:35:08 Just removed useless export function which I had forgotten to remove after testing... Download
1.0.0 2011-07-19 15:28:33 First public release Download