Jump to content

setPedAnimation/getPedAnimation


BTBORIBOSs

Recommended Posts

Does anyone know how I need to use the commands setPedAnimation and getPedAnimation? When I try my code (serverside) on my server, I got the error "attempt to call global 'setPedAnimation' (a nil value)".

This is the code:

  
function joinHandler() 
  
        local x = 1959.55 
        local y = -1714.46 
        local z = 10 
        spawnPlayer(source, x, y, z) 
        fadeCamera(source, true) 
        setCameraTarget(source, source) 
        outputChatBox("Welcome to My Server", source) 
end 
addEventHandler("onPlayerJoin", getRootElement(), joinHandler) 
  
function animationTry(thePlayer, command, animation) 
  
        local a = setPedAnimation(thePlayer, "FightB_1", "FightB_1", -1, true, true, false)      
         
end 
addCommandHandler("animation", animationTry) 
  

Link to comment
Does anyone know how I need to use the commands setPedAnimation and getPedAnimation? When I try my code (serverside) on my server, I got the error "attempt to call global 'setPedAnimation' (a nil value)".

This is the code:

  
function joinHandler() 
  
        local x = 1959.55 
        local y = -1714.46 
        local z = 10 
        spawnPlayer(source, x, y, z) 
        fadeCamera(source, true) 
        setCameraTarget(source, source) 
        outputChatBox("Welcome to My Server", source) 
end 
addEventHandler("onPlayerJoin", getRootElement(), joinHandler) 
  
function animationTry(thePlayer, command, animation) 
  
        local a = setPedAnimation(thePlayer, "FightB_1", "FightB_1", -1, true, true, false)      
         
end 
addCommandHandler("animation", animationTry) 
  

What client are you using? if its DP2 then you cant, id suggest trying the nightly builds

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