Tete omar Posted July 6, 2012 Share Posted July 6, 2012 server side fixing1 = createMarker ( -1633.3894042969, -2237.8020019531, 30.4765625, "cylinder", 1.5, 255, 255, 0, 200 ) function hitmyelement1() setPedAnimation(source, "ped", "BIKE_elbowR") setTimer(setPedAnimation, 1000, 1, source, "ped", "BIKE_elbowR") end addEventHandler("onMarkerHit", fixing1, hitmyelement1) if i hit this marker nothing happens why ?? Link to comment
Castillo Posted July 6, 2012 Share Posted July 6, 2012 Because 'source' of onMarkerHit is the marker the element just hit, not a player element. fixing1 = createMarker ( -1633.3894042969, -2237.8020019531, 30.4765625, "cylinder", 1.5, 255, 255, 0, 200 ) function hitmyelement1 ( hitElement ) setPedAnimation(hitElement, "block1", "anim1") setTimer(setPedAnimation, 1000, 1, hitElement, "ped", "BIKE_elbowR") end addEventHandler("onMarkerHit", fixing1, hitmyelement1) Link to comment
Tete omar Posted July 6, 2012 Author Share Posted July 6, 2012 have you idea how do i stop the player : ) can't stop and thanks Link to comment
Castillo Posted July 6, 2012 Share Posted July 6, 2012 Stop the player? do you mean freeze him? if so, use setElementFrozen. Link to comment
Tete omar Posted July 6, 2012 Author Share Posted July 6, 2012 Stop the player? do you mean freeze him? if so, use setElementFrozen. no, i mean unfreeze him .. i can't move from the current animation so setTimer doesn't work .. i want set the player animation for 3 seconds .."3000" ofc so should i use setTimer(setElementFrozen, 3000, 1, hitElement, "ped", "BIKE_elbowR", false) or what Link to comment
Castillo Posted July 6, 2012 Share Posted July 6, 2012 fixing1 = createMarker ( -1633.3894042969, -2237.8020019531, 30.4765625, "cylinder", 1.5, 255, 255, 0, 200 ) function hitmyelement1 ( hitElement ) setPedAnimation(hitElement, "block1", "anim1") setTimer( setPedAnimation, 1000, 1, hitElement ) end addEventHandler("onMarkerHit", fixing1, hitmyelement1) Link to comment
Tete omar Posted July 6, 2012 Author Share Posted July 6, 2012 sorry it doesn't work when i hit the marker Link to comment
Castillo Posted July 6, 2012 Share Posted July 6, 2012 It should stop the animation 1 second after you set it, try increasing it to 5 seconds or something. Link to comment
Tete omar Posted July 6, 2012 Author Share Posted July 6, 2012 ooops thanks it worked now thanks aloot !!!! 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