kalitonchik Posted April 3, 2009 Posted April 3, 2009 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
lil Toady Posted April 3, 2009 Posted April 3, 2009 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 )
kalitonchik Posted April 3, 2009 Author Posted April 3, 2009 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!
DakiLLa Posted April 3, 2009 Posted April 3, 2009 did you see his post? You have to pass strings! setPedAnimation ( APed, "ped", "WALK_drunk", -1, true, true, true ) p.s. , - lol
kalitonchik Posted April 3, 2009 Author Posted April 3, 2009 okey i know need setPedAnimation ( APed, "ped", "WALK_drunk", -1, true, true, true ) but anyway dont work? any ideas? and whot you mean with that pass strings ?
kalitonchik Posted April 3, 2009 Author Posted April 3, 2009 yes I'm sure i create only one ped FTW! so whot is incorrect
Gamesnert Posted April 3, 2009 Posted April 3, 2009 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.
Slothman Posted April 3, 2009 Posted April 3, 2009 can you tell if the function is starting? "onResourceStart" is serverside, for clients you need "onClientResourceStart"
kalitonchik Posted April 3, 2009 Author Posted April 3, 2009 i nowed i miss TIMERS! heheh uuweeeeeeee i'm act a fool
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