Starztec Posted September 7, 2017 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?
Starztec Posted September 8, 2017 Author 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
KaR0n! Posted September 8, 2017 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
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