-
Posts
194 -
Joined
-
Last visited
Everything posted by Gothem
-
El Map editor no inicia
Gothem replied to lmoreloss's topic in Ayuda relacionada al cliente/servidor
Prueba con la versión que aparece AQUÍ -
Con respecto al tema, puedes buscar en los archivos del gta una bandera (gta3.img ) para modificarla.
-
Did you said peds in mta? NOTE: I Don't made that script. I found it in a test server of mta.
-
It seems to be more a script problem. Could you give more details?
-
Que tiene que ver esa función con el tema!? mira te voy a dejar los scripts Server: function FxNitro(jugador) local veh = getPedOccupiedVehicle(jugador) --Obtenemos el vehiculo del jugador if veh then triggerClientEvent("fxNitro",jugador, veh) -- Si es que esta en un vehiculo, enviar a los clientes la información para que agreguen el efecto. end end addEventHandler("onPlayerJoin",getRootElement(),function() bindKey(source,"vehicle_fire", "down", FxNitro) -- Nos aseguramos de que, al entrar el jugador, el servidor empieze a llamar la función cuando este active el nitro. end) Cliente: addEvent("fxNitro",true) local nitro = {} function FxNitro(veh) if nitro[veh] and isTimer(nitro[veh]) then killTimer(nitro[veh]) end -- Nos aseguramos que no se sobrecargue la función if getVehicleController(veh) then --Revisamos que este en un vehiculo local x,y,z = getElementPosition(veh) --Obtenemos la posicion del vehiculo local rx,ry,rz = getElementRotation(veh) --Y su rotación rz = math.rad(rz-180) --Pasamos su rotación a radianes local dx,dy = math.cos(rz)*2,math.sin(rz)*2 --Calculamos un punto en la parte trasera del vehiculo fxAddTankFire(x,y,z,dx,dy,z) --Agregamos el efectos con las variables sacadas anteriormente nitro[veh] = setTimer(FxNitro,500,1,veh) --Se vuelve a llamar la función en 5 milisegundos más para agregar nuevamente el efecto end end addEventHandler("fxNitro",getRootElement(),FxNitro) --Al apretar la tecla de nitro se llama a la función de arriba
-
Vas a tener que sincronizarlo, ya que el código que te deje es para que lo veas tu nomas. Para que lo vean los demás debes mandar la información al servidor y de ahí al cliente (O detectar desde el servidor y enviar a todos los clientes) Trata de hacer el código tu mismo y si tienes dudas pregunta.
-
La funcion fxAddTankFire Provoca ese efecto. Ejemplo: function FxNitro() local veh = getPedOccupiedVehicle(getLocalPlayer()) --Obtenemos el vehiculo del jugador if veh and getControlState("vehicle_fire") then --Revisamos que este en un vehiculo y este apretando el boton de nitro local x,y,z = getElementPosition(veh) --Obtenemos la posicion del vehiculo local rx,ry,rz = getElementRotation(veh) --Y su rotación rz = math.rad(rz-180) --Pasamos su rotación a radianes local dx,dy = math.cos(rz)*2,math.sin(rz)*2 --Calculamos un punto en la parte trasera del vehiculo fxAddTankFire(x,y,z,dx,dy,z) --Agregamos el efectos con las variables sacadas anteriormente setTimer(FxNitro,500,1) --Se vuelve a llamar la función en 5 milisegundos más para agregar nuevamente el efecto end end bindKey("vehicle_fire", "down", FxNitro) --Al apretar la tecla de nitro se llama a la función de arriba Esto deberia crear el efecto.
-
Puros script kiddies andan por aquí parece......
-
because the two are based in the default skin?
-
This skin is based in the default one, with a blue touch and squared it a little. DOWNLOAD!
-
Mira el 'if' 'then' quiere decir si ... entonces ... (Ejemplo: Si tengo un auto entonces llego altiro a mi casa) el 'else' quiere decir lo contrario al if y se usa con este. (Ejemplo: Si tengo un auto entonces llego altiro a mi casa, de lo contrario tengo que caminar) el 'source' quiere decir el elemento base de un evento. Osea el elemento que llamo al evento. (Por ejemplo los eventos onPlayerConnect o onPlayer..... tienen de elemento base a un jugador, ya que estos llaman el evento) el 'ipairs' y 'pairs' se usan en 'for' loops. Como dijo anteriormente solidsnake. Los loops por si no lo sabes son repeticiones de codigo. Ahora la diferencia entre 'ipairs' y 'pairs' es que el 'ipairs' se usan con tablas con clave numerica (key numerica), y por otro lado el 'pairs' trabaja con cualquier clave.
-
Que te lo diga no quiere decir que sea en verdad. Tal vez te esta jugando una broma. Ademas un ataque DoS no necesariamente tiene que ver con los puertos y esas cosas. Tal vez sea un error de algún script que tengas en el servidor. Y otra cosa, podrías dar mas detalles del problema?
-
problema con el zip de un recurso
Gothem replied to dark_lord's topic in Ayuda relacionada al cliente/servidor
Y con respecto al problema. Talvez sea porque comprimes la carpeta y queda la carpeta en si en el zip. Trata comprimiendo los archivos y me dices. -
Que te dice que fue un ataque DoS? Da mas detalles si quieres que te ayudemos porque tal vez no sea ataque DoS
-
local godmode addCommandHandler("godmode",function() if not godmode then addEventHandler("onClientPlayerDamage",lplayer,DaGud) godmode = true else removeEventHandler("onClientPlayerDamage",lplayer,DaGud) godmode = false end end) function DaGud() cancelEvent() end Todo eso en el cliente.
-
Problema con mi map editor...ayuda
Gothem replied to nagato's topic in Ayuda relacionada al cliente/servidor
probaste reinstalando MTA ? -
quieres hacer algo como esto? https://community.multitheftauto.com/index.php?p= ... ils&id=355
-
De hecho hay un plugin para el notepad++ donde trae las funciones del MTA con autocompletado y otras cosas. http://cazomino05.com/lua2.xml ahi esta el link lo dejas en la carpeta plugins/API del notepad++
-
si entiendo eso. Pero a lo que voy es que por que usar getElementType si el tipo definido de los camiones es de 'vehicle' y no como se expresa en el código, ya que están creados vía script. Y ademas se redefine la variable como 4 veces... Por ejemplo el codigo podria haber quedado asi si los vehiculos se hubieran querido crear via script. local truckerTM = createTeam ( "Trucker", 255, 255, 0 ) local truckerMK = createMarker ( 797.6, -617.05, 15.4, "cylinder", 2, 255, 255, 0, 255, getRootElement() ) setElementID( createVehicle ( 455, 828.2, -607, 16,9, 0, 0, 0, "TRC001" ) , "truckerVH1" ) setElementID( createVehicle ( 455, 821, -607, 16,9, 0, 0, 0, "TRC002" ) , "truckerVH1" ) setElementID( createVehicle ( 455, 792, -607, 16,9, 0, 0, 0, "TRC003" ) , "truckerVH1" ) setElementID( createVehicle ( 455, 785, -607, 16,9, 0, 0, 0, "TRC004" ) , "truckerVH1" ) local truckerBP = createBlip ( 797, -617, 16.8, 51, 2, 255, 255, 0, 255, 0, 99999.0, getRootElement() ) function MarkerHit( thePlayer, hitElement, matchingDimension ) setElementModel (thePlayer, 206 ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit) function MarkerHit( thePlayer, hitElement, matchingDimension ) giveWeapon ( thePlayer, 7 ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit ) function MarkerHit( thePlayer, hitElement, matchingDimension ) setPlayerTeam ( thePlayer, truckerTM ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit ) 23. function activeMision (source, commandName) outputChatBox ( "Complete all 15 deliveries, and receive 25.000$", thePlayer, 255, 255, 0 ) local wP1 = createMarker ( 1659, 131, 30, "checkpoint", 2, 255, 255, 0, 255, thePlayer ) local bP1 = createBlip ( 1659, 131, 30, 53, 2, 255, 255, 0, 255, 0, 99999.0, thePlayer ) addEventHandler ( "onMarkerHit", wP1, function ( hitElement, matchingDimension ) if getElementID ( hitElement ) == "truckerVH1" then outputChatBox ( "1 to 15 complete deliveries", thePlayer, 255, 255, 0 ) destroyElement (wP1) destroyElement (bP1) end end ) end addCommandHandler ("activeMision", activeMision )
-
local truckerTM = createTeam ( "Trucker", 255, 255, 0 ) local truckerMK = createMarker ( 797.6, -617.05, 15.4, "cylinder", 2, 255, 255, 0, 255, getRootElement() ) local truckerVH1 = createVehicle ( 455, 828.2, -607, 16,9, 0, 0, 0, "TRC001" ) local truckerVH1 = createVehicle ( 455, 821, -607, 16,9, 0, 0, 0, "TRC002" ) local truckerVH1 = createVehicle ( 455, 792, -607, 16,9, 0, 0, 0, "TRC003" ) local truckerVH1 = createVehicle ( 455, 785, -607, 16,9, 0, 0, 0, "TRC004" ) local truckerBP = createBlip ( 797, -617, 16.8, 51, 2, 255, 255, 0, 255, 0, 99999.0, getRootElement() ) function MarkerHit( thePlayer, hitElement, matchingDimension ) setElementModel (thePlayer, 206 ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit) function MarkerHit( thePlayer, hitElement, matchingDimension ) giveWeapon ( thePlayer, 7 ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit ) function MarkerHit( thePlayer, hitElement, matchingDimension ) setPlayerTeam ( thePlayer, truckerTM ) end addEventHandler ( "onMarkerHit", truckerMK, MarkerHit ) function activeMision (thePlayer, commandName, hitElement, matchingDimension) outputChatBox ( "Complete all 15 deliveries, and receive 25.000$", thePlayer, 255, 255, 0 ) local wP1 = createMarker ( 1659, 131, 30, "checkpoint", 2, 255, 255, 0, 255, thePlayer ) local bP1 = createBlip ( 1659, 131, 30, 53, 2, 255, 255, 0, 255, 0, 99999.0, thePlayer ) if getElementType ( hitElement ) == "truckerVH1" then outputChatBox ( "1 to 15 complete deliveries", thePlayer, 255, 255, 0 ) destroyElement (wP1) destroyElement (bP1) end --addEventHandler ( "onMarkerHit", wP1, activeMision ) Como va a tener de elemento base algo que no existe? end addCommandHandler ("activeMision", activeMision ) Ahi lo arregle un poco.... PD: al parecer hay hartas incoherencias en la función activeMision del código.... podrías explicar bien la función?
-
podrías mostrar el código del primero y del segundo para ver los errores?