golanu21 Posted August 21, 2013 Share Posted August 21, 2013 cur = 1 if cur == 1 then setTimer(triggerServerEvent, 2000, 200000000000 ,"setstat", localPlayer) end bindKey("space", "down", stopanimation) function stopanimation () setElementFrozen(localPlayer, false) setPedAnimation (localPlayer, false) cur = 0 end when i press space, this frozen stop the ped animation stop but the timer is still working Link to comment
bandi94 Posted August 21, 2013 Share Posted August 21, 2013 cur = 1 if cur == 1 then timerToKill = setTimer(triggerServerEvent, 2000,0 ,"setstat", localPlayer) -- 0 in setTimer = infinite end bindKey("space", "down", stopanimation) function stopanimation () setElementFrozen(localPlayer, false) setPedAnimation (localPlayer, false) if isTimer( timerToKill) then killTimer (timerToKill) cur = 0 end end 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