WIRECOM Posted March 24, 2020 Share Posted March 24, 2020 anyone has a WORKING script that allows me to display a hat on my head? i tried tons of scripts but none of them worked Link to comment
The_GTA Posted March 24, 2020 Share Posted March 24, 2020 Hello WIRECOM, have you tried using the bone_attach resource and attaching the hat object to the head bone of your ped? What kind of hat are you trying to display on the head? Link to comment
Moderators Patrick Posted March 24, 2020 Moderators Share Posted March 24, 2020 How The_GTA said, you need to use bone_attach. But here is a similar resource, check how it works: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14125 Link to comment
WIRECOM Posted March 24, 2020 Author Share Posted March 24, 2020 10 minutes ago, The_GTA said: Hello WIRECOM, have you tried using the bone_attach resource and attaching the hat object to the head bone of your ped? What kind of hat are you trying to display on the head? a beret, i've got the model from samp. i know about the bone_attach thingy but i couldn't figure out how to use it Can you possibly drop a piece of code i can add to the Bone attach script to place an object over head when ever i run a command (/hat) thx Link to comment
The_GTA Posted March 24, 2020 Share Posted March 24, 2020 (edited) 9 minutes ago, WIRECOM said: a beret, i've got the model from samp. i know about the bone_attach thingy but i couldn't figure out how to use itCan you possibly drop a piece of code i can add to the Bone attach script to place an object over head when ever i run a command (/hat) thx local object = createObject(hat_model, 0, 0, 0) exports.bone_attach:attachElementToBone(object, localPlayer, 1, 0, 0, 0, 0, 0, 0) clientside script. not tested. addCommandHandler("hat", function(p) local object = createObject(hat_model, 0, 0, 0) exports.bone_attach:attachElementToBone(object, p, 1, 0, 0, 0, 0, 0, 0) end ); serverside version. Edited March 24, 2020 by The_GTA Link to comment
WIRECOM Posted March 24, 2020 Author Share Posted March 24, 2020 i'll try it out this evening thnx in advance Link to comment
The_GTA Posted March 24, 2020 Share Posted March 24, 2020 2 minutes ago, WIRECOM said: i'll try it out this evening thnx in advance I recommend you to look at the maskepanel resource aswell, the one that Patrick posted. It has good sample code if you need to know specifics. Link to comment
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