viniciusph40 Posted May 27, 2015 Share Posted May 27, 2015 hello I would like your help , wanted a handcuff command with that animation as if someone pass me the download to put on the server thank Mecher not know much about scripter agardeço since ja Link to comment
SpoC^ Posted May 28, 2015 Share Posted May 28, 2015 I believe that you are in the wrong place, here is HELP in Possible errors with SCRIPTING... Link to comment
viniciusph40 Posted May 28, 2015 Author Share Posted May 28, 2015 I believe that you are in the wrong place, here is HELP in Possible errors with SCRIPTING... but I wanted to know what you want I do with this command and this all right to shackle a player 's server addCommandHandler ( "handcuff", function ( thePlayer, _, who ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Police" ) ) then local target = getPlayerFromName ( who ) -- Get the player from it's name if ( target ) then -- If the player exists setPedAnimation ( target, "SHOP", "SHP_Rob_Handsup", -1, true, false, false ) -- Set his/her animation setElementFrozen ( target, true ) -- Free him/her outputChatBox ( "Player ".. getPlayerName ( target ) .." was handcuffed by ".. getPlayerName ( thePlayer ) ..".", root, 255, 241, 0 ) -- Output a global message end end end ) Link to comment
The_Walrus Posted May 28, 2015 Share Posted May 28, 2015 Start by using the command "/debugscript 3", and don't forget to check your server logs. If you notice any errors in your code post them here. Also, when you post Lua code, use this for syntax highlighting: [/code]What you've done so far is just the hands-up animation on the target player after issuing the command, what would you like to do next? attach some kind of handcuffs object? if so, you need the resource: bone_attach. [code=lua] Link to comment
viniciusph40 Posted May 28, 2015 Author Share Posted May 28, 2015 Start by using the command "/debugscript 3", and don't forget to check your server logs. If you notice any errors in your code post them here. Also, when you post Lua code, use this for syntax highlighting: [/code]What you've done so far is just the hands-up animation on the target player after issuing the command, what would you like to do next? attach some kind of handcuffs object? if so, you need the resource: bone_attach. [code=lua] yes I wanted to put handcuff object could help me create this 'm very please nub Link to comment
The_Walrus Posted May 28, 2015 Share Posted May 28, 2015 It's easy when you know the coordinates of your ped's bone and the ID of the handcuffs object, (not sure if such object exist, never seen any). The closest thing to that I've done before would be this piece of code, which will attach a ciggaret in your right hand. The result may vary depending on skin model, but the place on your bone where you wish to add the handcuffs is relatively close, you only need to attach them on one arm, then force the position of the other arm to fit in the other end of the hand cuffs according to it's size. This might be possible to accomplish using an animation. -- Create and attach ciggaret local ciggaret= createObject ( 1485, 0, 0, 0 ) exports.bone_attach:attachElementToBone(ciggaret,plr,11,0.15,0.1,0.15,0,180,30) Assuming bone_attach is properly installed and running and "plr" is a player element. 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