Jump to content

SetPedAnimation Dont work


Recommended Posts

HEllo!

when I start the resource ped does not do the animation

function makePed ( )  
   ped1o =  createPed ( 73,20.038000106812,-327.09165039063,3.0661196708679 )  
   setPedRotation ( ped1o, -90 )  
   setPedAnimation ( ped1o, "CRACK" , "crckidle1" )  
end  
  
addEventHandler ( "onResourceStart", getRootElement(), makePed ) 

Link to comment

this works, the ped is created and makes the animation

function makePed ( )  
   ped1o =  createPed ( 73,20.038000106812,-327.09165039063,3.0661196708679 )  
   setPedRotation ( ped1o, -90 )  
   setPedAnimation ( ped1o, "CRACK" , "crckidle1" )  
end  
 addCommandHandler("ped",makePed ) 
  

but if I relog and it is up to the ped this stopped

Link to comment
try this

addEventHandler ( "onResourceStart", root, function (   ) 
    ped1o = createPed ( 73,20.038000106812,-327.09165039063,3.0661196708679 ) 
    setPedRotation ( ped1o, -90 ) 
    setTimer( setPedAnimation, 100, 1, ped1o, "CRACK", "crckidle1" ) 
end ) 

thanks brow

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