Jump to content

Frenar vehiculo


Starztec

Recommended Posts

16 hours ago, #Dv^ said:

No funciona, es decir me congela al usuario, pero el vehiculo sigue, y se da la contra la pared por no poder accionar...

 

addEventHandler("onClientGUIClick", guiRoot,    
	function()
		local getGui = guiGetVisible(Ventana2)
		if source == Empezar then	
			if getGui then 
				guiSetVisible(Ventana, false)
				showCursor(false)				
                MARKER1 = createMarker(2052.849609375, 987.1328125, 10.671875,"cylinder",2,255,0,0)
				addEventHandler( "onClientMarkerHit", MARKER1, Inicio )			
			end
		end
	end
)

function Inicio (element)
  if element == localPlayer then 
    if timer then killTimer(timer) timer = nil end 
	timer = setTimer(SiguienteCheckpoint, 3000, 1)
	setElementFrozen (true)
	end
  end

function SiguienteCheckpoint()
   destroyElement ( MARKER1 ) 
   setElementFrozen (false)
   MARKER2 = createMarker(2052.849609375, 987.1328125, 10.671875,"cylinder",2,255,0,0)
   timer = nil
   addEventHandler( "onClientMarkerHit", Marker2, Inicio2 )	 -- y ahi se repite el suceso	
end

 

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