roaddog Posted July 17, 2014 Share Posted July 17, 2014 Hey guys, I got an issue with this function. in this case InterpolateBetween only execute when first time it renders, and after that I didnt see it animated. I mean first time it renders, InterpolateBetween works but second, and so on, It doesnt Anyone can help me out? Thank you function whenTelp() fadeCamera(false) showChat(false) addEventHandler("onClientRender", root, busmove) setElementFrozen(localPlayer, true) setTimer(function() fadeCamera(true) setElementFrozen(localPlayer, false) showChat(true) removeEventHandler("onClientRender", root, busmove) end, 12000, 1) end function busmove() progress = progress + step -- Increasing the progress each frame if progress > 1 then -- Progress can't be more than 1 so let's limit it progress = 1000 end py = interpolateBetween(-500,sy/2-ssy/2,0,sy/2-(470/ry)*sy/2,0,0,progress,"OutElastic") dxDrawImage((268/rx)*sx, py, (183/rx)*sx, (180/ry)*sy, "bus.png", 0, 0, 0, tocolor(254, 254, 254, 255), true) end Link to comment
MTA Team botder Posted July 17, 2014 MTA Team Share Posted July 17, 2014 function whenTelp() progress = 0 -- Added this fadeCamera(false) showChat(false) addEventHandler("onClientRender", root, busmove) setElementFrozen(localPlayer, true) setTimer(function() fadeCamera(true) setElementFrozen(localPlayer, false) showChat(true) removeEventHandler("onClientRender", root, busmove) end, 12000, 1) end Link to comment
roaddog Posted July 17, 2014 Author Share Posted July 17, 2014 Thanks for replying. I resolved it. 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