Jump to content

How to determine if something attached to player's hand?


thund3rbird23

Recommended Posts

I'm trying to figure out how to use this function, but doesn't works.

Attached "doboz" to the player's hand:

doboz[thePlayer] = createObject(2912,0,0,0)
exports.bone_attach:attachElementToBone(doboz[thePlayer], thePlayer, 12,0,0,0.70,0,165,0)

And after that I wants to get if the "doboz" attached to the bone or no:

function xy(thePlayer)
if (exports.bone_attach:isElementAttachedToBone(doboz[thePlayer]))then
outputChatBox("Yes!")
else
outputChatBox("No!")
end
addCommandHandler("xy", xy)
Link to comment
1 hour ago, PaiN^ said:

Is it not working at all or is it saying No in the chat box? if it's the later, make sure that the player who's calling the command "xy" has an element attached and stored in the table doboz. if it's not working at all check the debug.

Uff, I just forgot to close the function with 'end'. It's works now.

Link to comment

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.
×
×
  • Create New...