Jump to content

Some Problems..


WiBox

Recommended Posts

Hey, I've some problems in engineReplaceAnimation, I've added some new animations but the thing is I'm adding a walk style into it and I used the walk style id "69" it totaly worked using setElementData so I make a new walk style using the same walk style id but using setElementData so I can change the animations, but the thing is I tried to use setTimer, but it's like bugging because I've used engineReplaceAnimation and to set it back I used engineRestoreAnimation, so it's like:

function test()
    if ( getElementData( localPlayer, "ModeOn" ) == "true" ) then
        local customBlockNames = "NewWalkStyle"
        local IFP = engineLoadIFP( "walkStyles/RIPeZpack.ifp", customBlockNames )
        engineReplaceAnimation( localPlayer, "ped", "climb_idle", customBlockNames, "CLIMB_idle" )
    elseif ( getElementData( localPlayer, "ModeOn" ) == "false" ) then
        engineRestoreAnimation( localPlayer, "ped", "climb_idle")
    end
end
setTimer( test, 1000, 0)

When I do the animation of climb_idle .. Sometimes it do it twice sometimes and too many other problems, I knew that it's from the setTimer because on checking each 1 second it will replace the animation each 1 second so I need to find a way another of setTimer, ofc not onClientRender because it will bug the animation ? already tested, so I wanted to ask if I can make something like add a event handler which is, "onClientChangeWalkStyle" so any ideas? 

Edited by R.I.P Logic
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...