Yurigarga Posted July 3, 2018 Posted July 3, 2018 function attach(thePlayer) local x, y, z = getElementPosition (thePlayer) cigar = createObject (3044, x, y, z) local cash = getPlayerMoney (thePlayer) if cash > 5000 then setElementData (thePlayer, "cig", false) exports.bone:attachElementToBone(cigar, thePlayer, 11, 0, 0.05, 0.27, 90, 90, 90) setPedAnimation (thePlayer, "SMOKING", "M_smklean_loop") outputChatBox ("Sigara İcmek 5000 TL.Almak icin /sigara .Biritmek icin /bitir", thePlayer, 0, 255, 0) takePlayerMoney (thePlayer, 5000) else outputChatBox ("Sigara icecek paran yok.", thePlayer, 255, 0, 0) end end addCommandHandler ("sigara", attach) function detach(thePlayer) destroyElement (cigar) setPedAnimation (thePlayer, false) end addCommandHandler ("bitir", detach) He is not taking the cigarette to his mouth .How can I hand over the cigarette? 4 minutes ago, Yurigarga said: function attach(thePlayer) local x, y, z = getElementPosition (thePlayer) cigar = createObject (3044, x, y, z) local cash = getPlayerMoney (thePlayer) if cash > 5000 then setElementData (thePlayer, "cig", false) exports.bone:attachElementToBone(cigar, thePlayer, 11, 0, 0.05, 0.27, 90, 90, 90) setPedAnimation (thePlayer, "SMOKING", "M_smklean_loop") outputChatBox ("Sigara İcmek 5000 TL.Almak icin /sigara .Biritmek icin /bitir", thePlayer, 0, 255, 0) takePlayerMoney (thePlayer, 5000) else outputChatBox ("Sigara icecek paran yok.", thePlayer, 255, 0, 0) end end addCommandHandler ("sigara", attach) function detach(thePlayer) destroyElement (cigar) setPedAnimation (thePlayer, false) end addCommandHandler ("bitir", detach) He is not taking the cigarette to his mouth .How to combine cigarette animation?
MrKAREEM Posted July 3, 2018 Posted July 3, 2018 function attach(thePlayer) local x, y, z = getElementPosition (thePlayer) cigar = createObject (3044, x, y, z) local cash = getPlayerMoney (thePlayer) if cash > 5000 then setElementData (thePlayer, "cig", false) exports.bone:attachElementToBone(cigar, thePlayer, 11, 0, 0.05, 0.27, 90, 90, 90) setPedAnimation (thePlayer, "SMOKING", "M_smk_drag") outputChatBox ("Sigara İcmek 5000 TL.Almak icin /sigara .Biritmek icin /bitir", thePlayer, 0, 255, 0) takePlayerMoney (thePlayer, 5000) else outputChatBox ("Sigara icecek paran yok.", thePlayer, 255, 0, 0) end end addCommandHandler ("sigara", attach) function detach(thePlayer) destroyElement (cigar) setPedAnimation (thePlayer, false) end addCommandHandler ("bitir", detach) Try That
Yurigarga Posted July 3, 2018 Author Posted July 3, 2018 (edited) Dont work 1 minute ago, Yurigarga said: Dont work.I can not give him his hand.. :(((( ... 1 minute ago, Yurigarga said: Edited July 3, 2018 by Yurigarga
MrKAREEM Posted July 3, 2018 Posted July 3, 2018 Show Me The Debug But Did The Object Show Or Not And The Problem In Anim or Object Beacause am not understand u directly !
Yurigarga Posted July 4, 2018 Author Posted July 4, 2018 (edited) I want to hand the cigarette. Smoking does not move with the hand .pls help 8 hours ago, MrKAREEM said: Show Me The Debug But Did The Object Show Or Not And The Problem In Anim or Object Beacause am not understand u directly ! Edited July 4, 2018 by Yurigarga
JeViCo Posted July 4, 2018 Posted July 4, 2018 this is example from resource page: ped = createPed(105,0,0,3) burger = createObject(2880,0,0,0) exports.bone_attach:attachElementToBone(burger,ped,12,0,0,0,0,-90,0) try to change bone id: 11 -> 12 and change position + rotation of object
MrKAREEM Posted July 4, 2018 Posted July 4, 2018 exports.bone_attach:attachElementToBone(cigar ,thePlayer,12,0,0,0,0,-90,0) Replace That With The Old Code !
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