Jump to content

Objects stick at the player's hand


Recommended Posts

You mean just like that

if ( source == GUIEditor_Button[3] ) then 
      local Marker = createMarker ( -8.8994140625, 51.5, 2.0999999046326, "cylinder", 1.10000002, 255, 29, 91, 1 ) 
      addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) 
      if (hitPlayer == localPlayer) then      attachElementToBone(Marker,localPlayer,CJ_SANDBAG,-8.8994140625,51.5,2.0999999046326,1.9986572265625,177.99884033203,30.069580078125) 

alright ?

Link to comment
local Marker = createMarker ( -8.8994140625, 51.5, 2.0999999046326, "cylinder", 1.10000002, 255, 29, 91, 1 ) 
local sandbag = createObject ( 2060, 0, 0, 0, 0, 0, 0 ) 
  
function pegarsaco (hitPlayer) 
if (hitPlayer == localPlayer) then 
     exports.bone_attach:attachElementToBone ( sandbag, hitPlayer, 12, 0, 0, 0, 0 , 0, 0 ) 
    end 
end 
addEventHandler('onClientMarkerHit', Marker, pegarsaco) 

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...