Jump to content

MBAUser

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MBAUser's Achievements

Square

Square (6/54)

0

Reputation

  1. Exacto, poner multiples skin para cualquier vehiculo; o por lo menos 4 por cada uno...
  2. Buenas noches!!, Alguien sabe si se puede de alguna manera tener varios "Skins de autos" y que sea visibles por todos¿? Otra pregunta es si esta función se puede hacer para un team nada mas, pero que los demas la puedan ver. Y la ultima si los coches que no tengan paintjob se pueden aplicar mas de 4, y de que manera, si alguno sabe aunque sea uno me seria de gran ayuda, gracias! function CambiarSkin1() txd = engineLoadTXD("mod.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("mod.dff", 411) engineReplaceModel(dff, 411) end addEventHandler("onClientResourceStart", resourceRoot, CambiarSkin1) --Hay alguna forma de cambiarlo para que solo un team se le aplique?
  3. Buenas noches!!, Alguien sabe si se puede de alguna manera tener varios "Skins de autos" y que sea visibles por todos¿? Otra pregunta es si esta función se puede hacer para un team nada mas, pero que los demas la puedan ver. Y la ultima si los coches que no tengan paintjob se pueden aplicar mas de 4, y de que manera, si alguno sabe aunque sea uno me seria de gran ayuda, gracias! function CambiarSkin1() txd = engineLoadTXD("mod.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("mod.dff", 411) engineReplaceModel(dff, 411) end addEventHandler("onClientResourceStart", resourceRoot, CambiarSkin1) --Hay alguna forma de cambiarlo para que solo un team se le aplique?
  4. Me la complicaba al pedo, ya me funcionó, gracias!! ¿Hay alguna forma de que se active cuando el vehiculo del usuario sea 0? ? function L58Inicio1 (element) if element == localPlayer then local veh = getPedOccupiedVehicle(player) local vx, vy, vz = getVehicleTurnVelocity(veh) if vx, vy, vz = (0, 0, 0) outputChatBox("Cargando pasajeros", 0, 255, 0, false) ---------------------------------------------------------------------------------------- if timer then killTimer(timer) timer = nil end toggleAllControls (false) timer = setTimer(L54Ip1, 7000, 1) end end end if vx, vy, vz = (0,0,0) Me parece que eso es lo que esta mal hecho para el true o false, ¡Gracias por hacerme buscar mas en la wiki!
  5. addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == Aboton1 then if getGui then guiSetVisible(Ventana2, false) showCursor(false) Marker1 = createMarker(2482.4780273438, 1917.6636962891, 10.768750190735-1,"cylinder",2,255,0,0) addEventHandler( "onClientMarkerHit", Marker1, Inicio ) Mk1 = createBlipAttachedTo ( Marker1, 0 ) end end end ) function Inicio (element) if element == localPlayer then if timer then killTimer(timer) timer = nil end timer = setTimer(create_marker, 3000, 1) freezeThisDude ( source, 5000 ) end end function freezeThisDude ( thePlayer, freezeTime ) toggleAllControls ( thePlayer, false ) setTimer ( toggleAllControls, freezeTime, 1, thePlayer, true ) end Mepa q esta es la forma de aplicarlo en el Server, pero no en Client, porq no me congela al personaje
  6. hay alguna forma de detener al jugador? Que no pueda acelerar, o que no se pueda mover, digamos congelarlo, en lo posible no acelerar...
  7. Muchas gracias! Es justo lo que yo buscaba, ultima pregunta, como le puedo agregar para que los jugadores al llegar al marquer tengan que esperar 3 segundos? Gracias!
  8. Hola a todos!! Les cuento lo que me esta pasando, quiero crear una función que me permita que a partir de presionar un boton, se active una función de crearse un marker y despues que desaparesca al pisarlo, alguien sabe? Este es el código que hice: ----------------------------------------------------- -- Esto seria la parte del panel para que empieze a la función, osea con "BOTON" ----------------------------------------------------- addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == BOTON then --Para que se cree el marquer pulsar este boton if getGui then guiSetVisible(Ventana2, false) showCursor(false) setElementVisibleTo ( Marker1, root, true ) --El voton "Crearia el marker 1" end end end end ) setElementVisibleTo ( Marker1, root, false ) Marker1 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) --Supuestamente apareceria cuando lo apretaria function Inicio () if isElementWithinMarker(source, Marker1) --Cuando toca sobre el marker desaparesca then destroyElement ( Marker1 ) --Se destruye el marker1 Marker2 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) --se crea el marker2 end end end addEventHandler( "onMarkerHit", Marker1, Inicio ) -------------------------------
  9. Mi problema es que obviamente no se scriptear bien jaja, pero tengo la idea de como hacerlo, es a partir del panel, (AL PULSAR > "ABOTON1" en el panel(Ventana2) empezar un recorrido, y hacer que se cree 1 marker, y asi apenas llega, que espere 3 segundos, se destruya el marker, y se cree 1 nuevo en otra parada y asi. Al llegar que le de dinero, no veo que sea algo dificil de hacer, pero intente de todo, por eso recurro a la comunidad... Espero que no sea mucha molestia, gracias por leer! ----------------------------------------------------- -- Esto seria la parte del panel para que empieze a trabajar osea "Aboton1" ----------------------------------------------------- addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == Aboton13 then if getGui then guiSetVisible(Ventana2, false) showCursor(false) end elseif source == Aboton1 then --Para empezar el trabajo if getGui then guiSetVisible(Ventana2, false) showCursor(false) setElementVisibleTo ( Linea54terminal, root, false ) end end end ) Linea54terminal = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) setElementVisibleTo ( Linea54terminal, root, false ) veh = {} function Linea54A (source) --Empieza el trabajo haciendo click en Aboton1<< if isElementWithinMarker(source, Linea54terminal) --Cuando toca con el Marker de la terminal la cosa es q empieze e lrecorrido then if veh[source] and isElement( veh[source] ) --Con determinado vehiculo del team then destroyElement ( Linea54terminal ) --Se destruye el marker de terminal Linea54Parada1 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) end end end addEventHandler( "onMarkerHit", Linea54terminal, incio ) -------------------------------
  10. Ahora si funcionó, Gracias!
  11. Al aplicar el comando /p no abre nada, intente borrando la ventana 2, y ahi si abre, ¿Alguna otra solución que sepan? Gracias igual! Pensaba que capas poniendo el segundo panel en una función se iba a poder, pero no encuento la manera..
  12. Holaa!! Como están? Les cuento de que va mi duda que le di vueltas y vueltas, pero no se bien como hacerlo, tengo muy pocos conocimientos de scripts, consulte la wiki pero todavia no me es muy familiar... Lo que intento hacer es que a partir del primer panel (Ventana) al hacer click en "Empezar a trabajar" con el "Boton11" De la "Ventana" es que se cierre todo y se habra la "Ventana2" para luego elegir ejemplo Aboton3 y empieze un Job, que si me podrian dar una orientación de como hacer la función se lo agradeceria, desde ya muchas gracias!! Ventana = guiCreateWindow(811, 397, 258, 400, "Planilla", false);guiSetVisible(Ventana, false) guiWindowSetSizable(Ventana, false) guiSetProperty(Ventana, "CaptionColour", "FF1FE9E2") Boton1 = guiCreateButton(33, 38, 84, 25, "Empresa:", false, Ventana); guiSetProperty(Boton1, "NormalTextColour", "FFFFFFFF") Boton2 = guiCreateButton(138, 38, 111, 25, "NOMBREEMPRESA", false, Ventana);guiSetProperty(Boton2, "NormalTextColour", "FF27F512") Boton3 = guiCreateButton(33, 91, 84, 25, "Chofer:", false, Ventana);guiSetProperty(Boton3, "NormalTextColour", "FFFFFFFF") Boton4 = guiCreateButton(138, 91, 111, 25, "Nombre:", false, Ventana);guiSetProperty(Boton4, "NormalTextColour", "FF27F512") Boton5 = guiCreateButton(33, 142, 84, 25, "Legajo:", false, Ventana);guiSetProperty(Boton5, "NormalTextColour", "FFFFFFFF") Boton6 = guiCreateButton(33, 196, 84, 25, "Interno:", false, Ventana);guiSetProperty(Boton6, "NormalTextColour", "FFFFFFFF") Boton7 = guiCreateButton(33, 249, 84, 25, "Generado:", false, Ventana);guiSetProperty(Boton7, "NormalTextColour", "FFFFFFFF") Boton8 = guiCreateButton(137, 142, 111, 25, "Legajo", false, Ventana);guiSetProperty(Boton8, "NormalTextColour", "FF27F512") Boton9 = guiCreateButton(137, 196, 111, 25, "INTERNO", false, Ventana);guiSetProperty(Boton9, "NormalTextColour", "FF27F512") Boton10 = guiCreateButton(137, 249, 111, 25, "PLATAGENERADA", false, Ventana);guiSetProperty(Boton10, "NormalTextColour", "FF27F512") Boton11 = guiCreateButton(30, 297, 218, 32, "Empezar a trabajar", false, Ventana);guiSetProperty(Boton11, "NormalTextColour", "FF22E7FF") Boton12 = guiCreateButton(33, 344, 84, 25, "Cerrar", false, Ventana);guiSetProperty(Boton12, "NormalTextColour", "FFFD2323") addCommandHandler("p", function() local team = getPlayerTeam(localPlayer) if team then local teamName = getTeamName(team) if teamName == "MOBSA" then local getGui = guiGetVisible(Ventana) if not getGui then guiSetVisible(Ventana, true) guiSetText(Boton2, teamName) guiSetText(Boton4, getPlayerName(localPlayer)) showCursor(true) else guiSetVisible(Ventana, false) showCursor(false) print "Tu trabajas de chofer actualmente" end else print "Tu trabajas de chofer actualmente" end end end ) addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana) if source == Boton12 then if getGui then guiSetVisible(Ventana, false) showCursor(false) end end end ) addEventHandler("onClientGUIClick", guiRoot, --Esta es la VENTANA2... function() Ventana2 = guiCreateWindow(743, 302, 278, 609, "Planilla MOBSA", false) Aboton = guiCreateButton(54, 37, 174, 33, "Seleccione un recorrido", false, Aboton);guiSetProperty(Boton13, "NormalTextColour", "FF07CDF8") Aboton1 = guiCreateButton(20, 103, 100, 29, "Linea 58", false, Aboton1) Aboton2 = guiCreateButton(116, 7, 15, 12, "", false, Aboton2) Aboton3 = guiCreateButton(20, 142, 100, 29, "2a", false, Aboton3) Aboton4 = guiCreateButton(20, 181, 100, 29, "3a", false, Aboton4) Aboton5 = guiCreateButton(20, 220, 100, 29, "4", false, Aboton5) Aboton6 = guiCreateButton(20, 259, 100, 29, "5", false, Aboton6) Aboton7 = guiCreateButton(20, 298, 100, 29, "6", false, Aboton7) Aboton8 = guiCreateButton(20, 337, 100, 29, "7", false, Aboton8) Aboton9 = guiCreateButton(20, 376, 100, 29, "8", false, Aboton9) Aboton10 = guiCreateButton(20, 415, 100, 29, "9", false, Aboton10) Aboton11 = guiCreateButton(20, 454, 100, 29, "10", false, Aboton11) Aboton12 = guiCreateButton(20, 493, 100, 29, "11", false, Aboton12) Aboton13 = guiCreateButton(150, 541, 100, 29, "Cerrar", false, Aboton13);guiSetProperty(Boton13, "NormalTextColour", "FFFB0202") Aboton14 = guiCreateButton(25, 541, 100, 29, "Volver", false, Aboton14);guiSetProperty(Boton14, "NormalTextColour", "FF1FDF3F") Aboton15 = guiCreateButton(130, 103, 130, 29, "Terminal - Dorlingo", false, Aboton15) Aboton16 = guiCreateButton(130, 142, 130, 29, "2", false, Aboton16) Aboton17 = guiCreateButton(130, 181, 130, 29, "3b", false, Aboton17) Aboton18 = guiCreateButton(130, 220, 130, 29, "3b", false, Aboton18) Aboton19 = guiCreateButton(130, 259, 130, 29, "3b", false, Aboton19) Aboton20 = guiCreateButton(130, 298, 130, 29, "3b", false, Aboton20) Aboton21 = guiCreateButton(130, 337, 130, 29, "3b", false, Aboton21) Aboton22 = guiCreateButton(130, 376, 130, 29, "3b", false, Aboton22) Aboton23 = guiCreateButton(130, 415, 130, 29, "3b", false, Aboton23) Aboton24 = guiCreateButton(130, 454, 130, 29, "3b", false, Aboton24) Aboton25 = guiCreateButton(130, 493, 130, 29, "3b", false, Aboton25) end end
  13. Todo funcionó perfecto, te agradezco!
  14. Buenas tardes, intenté hacer un panel para un determinado team, pero al momento de que aparescan en el panel determinados datos del jugador no lo hago correctamente. En "Nombreempresa" Deberia figurar el nombre del team y en donde dice "Nombre" ( Del boton 4) es donde apareceria el nombre del jugador. Intente hacerlo que aparesca en botones, o Label, pero en ninguno funciono, espero que me puedan ayudar, desde ya gracias. Cliente function PlanillaMOBSA() Ventana = guiCreateWindow(811, 397, 258, 400, "Planilla", false) guiWindowSetSizable(Ventana, false) guiSetProperty(Ventana, "CaptionColour", "FF1FE9E2") showCursor (true) Boton1 = guiCreateButton(33, 38, 84, 25, "Empresa:", false, Ventana) guiSetProperty(Boton1, "NormalTextColour", "FFFFFFFF") Boton2 = guiCreateButton(138, 38, 111, 25, "NOMBREEMPRESA", false, Ventana) --Aca es lo que necesito que me figure el nombre del team guiSetProperty(Boton2, "NormalTextColour", "FF27F512") Boton3 = guiCreateButton(33, 91, 84, 25, "Chofer:", false, Ventana) guiSetProperty(Boton3, "NormalTextColour", "FFFFFFFF") Boton4 = guiCreateLabel(138, 91, 111, 25, "Nombre:", false, Ventana) --Aca es lo que necesito que me figure el nombre del jugador guiSetProperty(Boton4, "NormalTextColour", "FF27F512") Boton5 = guiCreateButton(33, 142, 84, 25, "Legajo:", false, Ventana) guiSetProperty(Boton5, "NormalTextColour", "FFFFFFFF") Boton6 = guiCreateButton(33, 196, 84, 25, "Interno:", false, Ventana) guiSetProperty(Boton6, "NormalTextColour", "FFFFFFFF") Boton7 = guiCreateButton(33, 249, 84, 25, "Generado:", false, Ventana) guiSetProperty(Boton7, "NormalTextColour", "FFFFFFFF") Boton8 = guiCreateButton(137, 142, 111, 25, "Legajo", false, Ventana) guiSetProperty(Boton8, "NormalTextColour", "FF27F512") Boton9 = guiCreateButton(137, 196, 111, 25, "INTERNO", false, Ventana) guiSetProperty(Boton9, "NormalTextColour", "FF27F512") Boton10 = guiCreateButton(137, 249, 111, 25, "PLATAGENERADA", false, Ventana) guiSetProperty(Boton10, "NormalTextColour", "FF27F512") Boton11 = guiCreateButton(30, 297, 218, 32, "Empezar a trabajar", false, Ventana) guiSetProperty(Boton11, "NormalTextColour", "FF22E7FF") Boton12 = guiCreateButton(33, 344, 84, 25, "Cerrar", false, Ventana) guiSetProperty(Boton12, "NormalTextColour", "FFFD2323") addEventHandler( "onClientGUIClick", Boton12, CerrarFunc, false ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", localPlayer, PlanillaMOBSA ) function NombreFunc ( localPlayer ) ----No se como hacer que funcione esta funcion, o la manera por la cual. local NombreJugador = getPlayerFromName ( localPlayer ) guiSetText (Boton4, "Nombre:"..NombreJugador) end function CerrarFunc () showCursor (false) guiSetVisible (Ventana, not guiGetVisible ( Ventana ) ) end Servidor addCommandHandler ("planilla", function ( playerSource ) local teamPanel = getTeamFromName ( "MOBSA" ) local Team = getPlayerTeam ( playerSource ) if (Team) == teamPanel then triggerClientEvent ( playerSource, "onGreeting", playerSource) outputChatBox ( "Usted abrió su planilla.", playerSource, 0, 255, 0, true ) else outputChatBox ( "Usted no pertenece a ninguna empresa.", playerSource, 255, 0, 0, true ) end end )
×
×
  • Create New...