Padul Posted August 21, 2014 Share Posted August 21, 2014 Hi, i start to learn how to script in lua, i start with something easy like creating peds, making them doing animations. I get stuck on start. Ok, so i tried to make ped and make them moving, but, script create peds, make him rotate but, it doesn't make anything, can somebody help mi with this? function makePed() ped1 = createPed(139, 2039.0611572266, 1543.8338623047, 10.671875) setPedAnimation(ped1,"CRACK","crckidle2") end addEventHandler( "onResourceStart", getResourceRootElement(),makePed) Sorry, for my bad english ;d Link to comment
Castillo Posted August 21, 2014 Share Posted August 21, 2014 Use a timer of like 200 milliseconds to set the animation. setTimer Link to comment
Padul Posted August 21, 2014 Author Share Posted August 21, 2014 i dont know what i fcked up now but peds are multiplying function makePed() ped1 = createPed(139, 2039.0611572266, 1543.8338623047, 10.671875) setPedAnimation(ped1,"CRACK","crckidle2") setTimer ( makePed, 200, 1) end addEventHandler( "onResourceStart", getResourceRootElement(),makePed) Link to comment
./BlackBird# Posted August 22, 2014 Share Posted August 22, 2014 function makePed() ped1 = createPed(139, 2039.0611572266, 1543.8338623047, 10.671875) setTimer(setPedAnimation,200,1,ped1,"CRACK","crckidle2") end addEventHandler( "onResourceStart", getResourceRootElement(),makePed) 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