Starztec Posted September 7, 2017 Share Posted September 7, 2017 Hola a todos! Busque en la wiki y en mil lugares, y algo tan simple como frenar el vehiculo cuando está en el marker no lo puedo hacer! ¿Alguien que este mas en el tema y tenga experiencia de como? Link to comment
Starztec Posted September 8, 2017 Author Share Posted September 8, 2017 16 hours ago, #Dv^ said: setElementFrozen. 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
KaR0n! Posted September 8, 2017 Share Posted September 8, 2017 (edited) addCommandHandler("frenar", function (veh) local veh = getPedOccupiedVehicle(source) if veh then setElementFrozen ( veh, true ) end end) Acomodalo dentro de la función. Edited September 8, 2017 by KaR0n! 1 Link to comment
Starztec Posted September 9, 2017 Author Share Posted September 9, 2017 Solucionado, muchas gracias! 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