BTBORIBOSs Posted December 20, 2008 Share Posted December 20, 2008 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
Scarface Posted December 20, 2008 Share Posted December 20, 2008 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
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