Jump to content

setPedAnimation not working while not looped.


Bara

Recommended Posts

local dolls = {};
	dolls[1] = createPed ( 120, 1695.2199707031,-2278.3200683594,-1.2447323799133,0,false);
	setElementFrozen(dolls[1],false)
	setPedAnimation(dolls[1], "ped", "floor_hit", 1000, false, true, false); 

If animation are not looped it wont work, but if i turn the 4th arg true it will work

local dolls = {};
	dolls[1] = createPed ( 120, 1695.2199707031,-2278.3200683594,-1.2447323799133,0,false);
	setElementFrozen(dolls[1],false)
	setPedAnimation(dolls[1], "ped", "floor_hit", 1000, true, true, false); 

But i need a standstill ped that is lies on the floor.

Can someone explain how can i do it?

Link to comment
2 hours ago, Logan00 said:
local dolls = {};
	dolls[1] = createPed ( 120, 1695.2199707031,-2278.3200683594,-1.2447323799133,0,false);
	setElementFrozen(dolls[1],false)
	setPedAnimation(dolls[1], "ped", "floor_hit", 1000, false, true, false); 

If animation are not looped it wont work, but if i turn the 4th arg true it will work

local dolls = {};
	dolls[1] = createPed ( 120, 1695.2199707031,-2278.3200683594,-1.2447323799133,0,false);
	setElementFrozen(dolls[1],false)
	setPedAnimation(dolls[1], "ped", "floor_hit", 1000, true, true, false); 

But i need a standstill ped that is lies on the floor.

Can someone explain how can i do it?

setPedAnimation(dolls[1], "ped", "floor_hit", -1, false, false, false, false)

try this

 

Link to comment
On 5/28/2022 at 3:33 PM, Logan00 said:

still not working :/ it works with players but not with peds, ped are stay stand like nothing happend

I think you apply the animation immediately after creating the ped. Try setting the animation via setTimer ?

Spoiler

 

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