Jump to content

pedAnimation.


Recommended Posts

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

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

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