patrick2562 / mtasa-pattach Goto Github PK
View Code? Open in Web Editor NEWOptimized bone attach thanks to the new MTA functions/events.
License: GNU General Public License v3.0
Optimized bone attach thanks to the new MTA functions/events.
License: GNU General Public License v3.0
I think that there are some bones mixed on the Bones IDs & Names section of the documentation.
Head (ID: 8) seems to actually be the Jaw, and Neck 2 (ID: 5) seems to actually be the Head. Neck 2 really does not exist. When you attach an object to ID 8 it will move alongside your jaw (some walking animations move your jaw, so it's easier to see it like that).
You can also open up Blender, import a Skin and see which bone is were. For example using Blender, the one that is more close to the mouth (ID: 8) is called the Jaw, and it moves the jaw. While the other (ID: 5) is called the Head, and it moves the head.
You can see this in game.
Here are some videos (debug chat shows the Bone ID that is being used)
https://youtu.be/kpbhIjNGwr4
https://youtu.be/OAe9noSNatI
This also seems to be wrong on the wiki (4 is called uppertorso and 5 neck, when 4 is neck [this is technically correct since the neck bone kinda moves all of the upper torso but still] and 5 is head [5 is definitely head])
Export function:
invisible(ped, object, bool)
Adding the invisible option for one object, for example, I have a grenade and I throw it, I want to hide the object for a moment that I supposedly threw it and not detach it from the player's hand then reappear it
I noticed that you can't setElementAlpha on attached elements using the invisibleAll function.
I made an additional invisible function to change only a single attached element, and same result.
Didn't investigate further, but can you confirm this?
Hello)
My server-side example:
local object = Object(330, 0, 0, 0) exports.pAttach:attach(object, player, 24, 0, 0, 0, 0, 0, 0)
I got:
Expected element (except: player) at argument 1, got userdata
On server-side of my script object is element and object.
Another things:
I think, you have a mistake here:
https://github.com/Patrick2562/mtasa-pAttach#how-to-use
"Server sided example", but you use client-side localPlayer and do not use first player-argument of addCommandHandler function.
I want to manually control when collision of particular object is enabled or not, so i need some kind of property that hand control over "setElementCollisionEnabled" to my code instead of pAttach
Add option to attach to multiple bones at once, lets say left and right hand what cause attached element to be intrapolated between these two bones
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.