Jump to content

problem in setPedAnimation


Moayd

Recommended Posts

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

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 by Pirulax
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...