Tete omar Posted June 2, 2012 Posted June 2, 2012 How do i make any thing like the bag of money , or any object like the weapons the player can carry the weapons i want the player carry a pickup like the CJ_SANDBAG
Castillo Posted June 2, 2012 Posted June 2, 2012 You can use this resource: https://community.multitheftauto.com/ind ... ls&id=2540
Tete omar Posted June 2, 2012 Author Posted June 2, 2012 You can use this resource:https://community.multitheftauto.com/ind ... ls&id=2540 Can't understand how this this thing works .
Castillo Posted June 2, 2012 Posted June 2, 2012 It's like the function: attachElements but for Bones.
Tete omar Posted June 2, 2012 Author Posted June 2, 2012 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 ?
Castillo Posted June 2, 2012 Posted June 2, 2012 You gotta use the exported function correctly: exports [ "bone_attach" ]:attachElementToBone ( arguments )
Tete omar Posted June 2, 2012 Author Posted June 2, 2012 You gotta use the exported function correctly: exports [ "bone_attach" ]:attachElementToBone ( arguments ) Sorry if i'm too dumb but can you give me an example please.
Alexs Posted June 3, 2012 Posted June 3, 2012 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)
X-SHADOW Posted June 3, 2012 Posted June 3, 2012 Alexs_Steel why use if ( hitPlayer == localPlayer) ?
Alexs Posted June 3, 2012 Posted June 3, 2012 Alexs_Steel why use if ( hitPlayer == localPlayer) ? i dont know, but i use it and works
Castillo Posted June 3, 2012 Posted June 3, 2012 Alexs_Steel why use if ( hitPlayer == localPlayer) ? So if a remote client hits that marker, it'll not execute your 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