WIRECOM

hat script

Recommended Posts

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

Share this post


Link to post

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?

Share this post


Link to post
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

Share this post


Link to post
Posted (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 by The_GTA

Share this post


Link to post
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.

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.