Jump to content

PedAnim don't work _(°L°)_


Recommended Posts

function pedLoad () 
APed = createPed ( 137, 2334.5, 2160.5, 10.83 ) 
setPedRotation ( APed, 180 ) 
[color=#FF4000]setPedAnimation ( APed, ped, WALK_drunk, -1, true, true, true )[/color] 
end 
addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) 

animation don't work and don't show eror why don't work

do you have any ideas about it?

i shared similar scripts licke

http://development.mtasa.com/index.php? ... dAnimation

https://community.multitheftauto.com/index.html?p ... ils&id=242

Link to comment

you do

setPedAnimation ( APed, ped, WALK_drunk, -1, true, true, true )

and the script thinks that 'ped' and 'WALK_drunk' are variables, they obviously are not defined and passing nil cancels an animation. You have to pass strings!

setPedAnimation ( APed, "ped", "WALK_drunk", -1, true, true, true )

Link to comment

when i typed

setPedAnimation ( APed, "ped", "WALK_drunk", -1, true, true, true ) 

nothing hapens!

but when i typed

setPedAnimation ( APed, <ped>, <WALK_drunk/>, -1, true, true, true ) 

i have eror ( cause this symbols licke >)

lil Toady Can you explain me how can solve this problem in RUS

language

i hope!

Link to comment

Now I see!

function pedLoad () 
APed = createPed ( 137, 2334.5, 2160.5, 10.83 ) 
setTimer(setPedRotation,5000,1,APed,180 ) 
setTimer(setPedAnimation,5000,1,APed,"ped","WALK_drunk",-1,true,true,true ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) 

Stuff don't seem to work right after a ped is created, so you should delay that stuff with timers.

Not sure if I did it entirely correctly though.

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