Moayd Posted July 30, 2017 Share Posted July 30, 2017 hello everyone i have problem in setPedAnimation when hit marker i disable jump and start animation but when i jump the animation stops and i cannot jump this code local Marker = createMarker ( 192.95375 , 1903.21277 , 16.6 , "cylinder" , 1.5, 255, 128, 64, 255 ) addEventHandler ( "onMarkerHit" , Marker , function ( element ) if ( getElementType ( element ) == "player" ) then toggleControl ( element , "jump" , false ) setPedAnimation ( element , "attractors" , "stepsit_in",-1,false,true,false,false ) end end ) Link to comment
Discord Moderators Pirulax Posted July 30, 2017 Discord Moderators Share Posted July 30, 2017 (edited) Of curse, you cant jump, because you didn't even enable the control.. Read some MTA wiki please..But, the actual problem is, that currently theres no event that can be triggered when the animation ends, so you need to play a little bit with setTimer(function() setPedAnimation(element) end,TIME, 1) Good Luck. Edited July 30, 2017 by Pirulax Link to comment
Moayd Posted July 30, 2017 Author Share Posted July 30, 2017 you don't understand me , i disable jump but when i jump and the jump is disabled the anim stops Link to comment
Zorgman Posted July 30, 2017 Share Posted July 30, 2017 Stop freeroam resource if it's running. 1 Link to comment
Moayd Posted July 30, 2017 Author Share Posted July 30, 2017 @Zorgman thank you very much for your help it's working now 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