Majhol Posted July 13, 2013 Author Posted July 13, 2013 ya I did change them to 0,0,............ but it is not working
Majhol Posted July 13, 2013 Author Posted July 13, 2013 can u change the number for me and give it to me I swear I have been trying now since 1 hour please help me
Castillo Posted July 13, 2013 Posted July 13, 2013 Hold on, you forgot to specify the bone to attach it to. exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,24,0,0,0,0,0,0) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 exports [ "VEND_Drink_P" ]:attachElementToBone(kb_beer,player,24,0,0,0,0,0,0)end
Castillo Posted July 13, 2013 Posted July 13, 2013 Try it? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted July 13, 2013 Posted July 13, 2013 Post your new code. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 local pepsi = createObject( 955, 1463.5, -2206, 12.5, 0, 0, 0 ) local myMarker1 = createMarker( 1463.4791259766, -2207.4919433594, 13.546875, "cylinder", 1, 255, 255, 0, 170 ) local kb_beer = createObject( 1950, 1463.5, -2206, 12.5, 0, 0, 0 ) function MarkerHit1( player, matchingDimension ) takePlayerMoney ( player, tonumber(150) ) setPedAnimation( player, "VENDING", "VEND_Drink_P", -1, true, false, true ) setTimer(function () setPedAnimation ( player, nil, nil) end,1300,1, true) outputChatBox( "لقد استعدت قوتك", player, 255, 0, 0 ) setPedRotation ( player, 0 ) setElementHealth ( player, 100 ) exports [ "VEND_Drink_P" ]:attachElementToBone(kb_beer,player,24,0,0,0,0,0,0)end addEventHandler( "onMarkerHit", myMarker1, MarkerHit1 )
Castillo Posted July 13, 2013 Posted July 13, 2013 You named the bone_attach resource: "VEND_Drink_P"? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 no sorry I made mistake on this I renamed it now to bone_attach
Castillo Posted July 13, 2013 Posted July 13, 2013 Does it work now? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 Does it work now? Nope, this is the finale code local pepsi = createObject( 955, 1463.5, -2206, 12.5, 0, 0, 0 ) local myMarker1 = createMarker( 1463.4791259766, -2207.4919433594, 13.546875, "cylinder", 1, 255, 255, 0, 170 ) local kb_beer = createObject( 1950, 0, 0, 0, 0, 0, 0 ) function MarkerHit1( player, matchingDimension ) takePlayerMoney ( player, tonumber(150) ) setPedAnimation( player, "VENDING", "VEND_Drink_P", -1, true, false, true ) setTimer(function () setPedAnimation ( player, nil, nil) end,1300,1, true) outputChatBox( "لقد استعدت قوتك", player, 255, 0, 0 ) setPedRotation ( player, 0 ) setElementHealth ( player, 100 ) exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,24,0,0,0,0,0,0)end addEventHandler( "onMarkerHit", myMarker1, MarkerHit1 )
Castillo Posted July 13, 2013 Posted July 13, 2013 exports [ "bone_attach" ]:attachElementToBone ( kb_beer, player, 12, 0.015, 0.03, 0, 180, 0, 0 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 lool look now when I go to the marker he do the animation and nothing in the hand and I got shocked with this bottle in his hand
Majhol Posted July 13, 2013 Author Posted July 13, 2013 I guess we are close to the target all I want is him drinking the beer while in the marker and then the bottle should be gone
Castillo Posted July 13, 2013 Posted July 13, 2013 Change the offsets until it fits. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Majhol Posted July 13, 2013 Author Posted July 13, 2013 no what I mean I want to set a timer with it so when he drinks the bottle after 1300 the bottle should be gone not the position of the bottle
iMr.3a[Z]eF Posted July 13, 2013 Posted July 13, 2013 Is the outputChatBox type arabic? Why Don't you post this in arabic section? To Visit Us Press Here: mtasa://5.9.206.180:22002
Castillo Posted July 13, 2013 Posted July 13, 2013 local pepsi = createObject ( 955, 1463.5, -2206, 12.5, 0, 0, 0 ) local myMarker1 = createMarker ( 1463.4791259766, -2207.4919433594, 13.546875, "cylinder", 1, 255, 255, 0, 170 ) function MarkerHit1 ( player, matchingDimension ) takePlayerMoney ( player, 150 ) setPedAnimation ( player, "VENDING", "VEND_Drink_P", -1, true, false, true ) local kb_beer = createObject( 1950, 0, 0, 0, 0, 0, 0 ) setTimer ( function ( beer ) setPedAnimation ( player, nil, nil ) if isElement ( beer ) then destroyElement ( beer ) end end ,1300, 1, kb_beer ) outputChatBox ( "??? ?????? ????", player, 255, 0, 0 ) setPedRotation ( player, 0 ) setElementHealth ( player, 100 ) exports [ "bone_attach" ]:attachElementToBone ( kb_beer, player, 24, 0, 0, 0, 0, 0, 0 ) end addEventHandler ( "onMarkerHit", myMarker1, MarkerHit1 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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