Jump to content

GetPedAnimation return incorrect results


Z4Zy

Recommended Posts

Hello everyone !

When I use following piece of code to set the animation and get what animation the ped is doing, I've noticed that 'getPedAnimation' function doesn't return the correct animation when 'setPedAnimation' function's loop argument set to false. When loop argument set to true, 'getPedAnimation' function return the correct block and animation.

I used IFP_Demo resource's parkour.ifp file.

Client Side :

local ifp = engineLoadIFP("parkour.ifp", "parkour")

setPedAnimation(localPlayer, "parkour", "HandPlant", -1, false) -- set false argument to true when testing

setTimer(
function ()
  local block, anim = getPedAnimation(localPlayer)
	outputDebugString("Block : "..block..", Anim : "..anim)
end, 1000, 1
)

 

When 'setPedAnimation' function's loop argument set to false,

Spoiler

bifujaqsyzch4kjzg.jpg

INFO message has return the wrong block and animation.

 

When 'setPedAnimation' function's loop argument set to true,

Spoiler

sv25df36ojnp4ufzg.jpg

INFO message has return the correct block and animation.

 

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