Jump to content

mortal

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    ddddd

Recent Profile Visitors

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

mortal's Achievements

Member

Member (5/54)

1

Reputation

  1. https://community.multitheftauto.com/?p=resources&s=details&id=15515 https://community.multitheftauto.com/?p=resources&s=details&id=15515
  2. Yo quiero poner la s armas a un lado y el tro otro lado como lo ago asi
  3. كنت مساعدتي مع Respawn_Autos بالفعل منذ أو جئت وأريد أن أكون قادرة على dxDrawImage مساعدتي من فضلك
  4. I get it but it's out of control Respawn_Autos with ??? dx when the respawn is activated it does not work for me to remove local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) alpha = 0 local alphaState = true function alphaFunction() if alphaState == true then alpha = alpha + 10 if alpha >= 255 then alphaState = false end end if alphaState == false then alpha = alpha - 10 if alpha <= 0 then alphaState = true end end end addEventHandler("onClientRender", getRootElement(), alphaFunction) function chat(nome_jogador) nome = nome_jogador; tick15 = getTickCount() addEventHandler ("onClientRender", root, started) setTimer(function() removeEventHandler ("onClientRender", root, started) tick52 = getTickCount() addEventHandler("onClientRender", root, stopped) end, 5000, 1 ) addEventHandler("onClientRender", root, som) setTimer(function() tick52 = getTickCount() removeEventHandler("onClientRender", root, som) end, 50, 1) setTimer(function() removeEventHandler("onClientRender", getRootElement(), stopped) end, 7000, 1) end addEvent ("LimpouChat", true) addEventHandler ("LimpouChat", root, chat) local font = dxCreateFont("gfx/chalet.ttf", local font2 = dxCreateFont("gfx/mypro.ttf", 10) function started() dxDrawRectangle(x*45, y*573, x*291, y*160, tocolor(0, 0, 0, 220), false) dxDrawImage(x*55, y*582, x*18, y*12, "gfx/env.png", 0,0,0, tocolor(255,255,255,255)) dxDrawText("#00FF00Mensagem:", x*80, y*579, x*0, y*0, tocolor(255, 255, 255, 255), 1.0, font2, "left", "top", false, false, true, true, false) dxDrawText(nome.."#FFFFFF limpou o bate-papo.", x*0, y*650, x*370, y*0, tocolor(255, 255, 255, 255), 1.0, font2, "center", "top", false, false, true, true, false) end function som() playSound("sfx/notification.mp3", false) end function stopped () local fade,pox,_ = interpolateBetween(100, 200, 0, 0, 200, 0, ((getTickCount() - tick52) / 500), "Linear") dxDrawRectangle(x*45, y*573, x*291, y*160, tocolor(0, 0, 0, fade), false) dxDrawImage(x*55, y*582, x*18, y*12, "gfx/env.png", 0,0,0, tocolor(255,255,255,fade)) dxDrawText("#00FF00Mensagem:", x*80, y*579, x*0, y*0, tocolor(255, 255, 255, fade), 1.0, font2, "left", "top", false, false, true, true, false) dxDrawText(nome.."#FFFFFF limpou o bate-papo.", x*0, y*650, x*370, y*0, tocolor(255, 255, 255, fade), 1.0, font2, "center", "top", false, false, true, true, false) end
  5. mortal

    Respawn_Autos

    -----------clientee ---- local x, y = guiGetScreenSize ( ) sWidth,sHeight= guiGetScreenSize() function main() start = getTickCount() addEventHandler("onClientRender", getRootElement(), respawnVehicles ) end addEventHandler("onClientResourceStart", getResourceRootElement(), main) function respawnVehicles() xdDrawAnimWindow("hhopliio",420,400, tocolor(255, 0, 0, 255),"default-bold","InOutBack") setTimer(function () local vehicles = getElementsByType ( "vehicle" ) xdDrawAnimWindow("hhopliio",420,400, tocolor(255, 0, 0, 255),"default-bold","InOutBack") for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, 10000, 1) end setTimer(respawnVehicles, 10000, 0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end function xdDrawAnimWindow(text,alto,ancho,color,font,anim) btAncho = ancho btAlto = alto/20 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim) local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim) posx = (x/2)-(x1/2) posy = (y/2)-(y1/2) dxDrawRectangle ( posx, posy-y2, x2, y2, color ) dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) ) dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2, font,"center","center") --Para obtener mas animaciones visita https://wiki.multitheftauto.com/wiki/Easing end --------------------------- -----------------------server ------------------------ function respawnExplodedVehicle() setTimer(respawnVehicle, 5000, 1, source) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle)
  6. mortal

    Respawn_Autos

    me ayudan no puedo que la imagen duro tiempo se queta muy rapido ----- Client ----- local screenWidth,screenHeight = guiGetScreenSize() ---------------------------- function respawnVehicles ( ) dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, "canakkale.png", 0, 0, tocolor( 255, 255, 255 ) ) setTimer(function () local vehicles = getElementsByType ( "vehicle" ) local seconds = getTickCount() / 1000 local angle = math.sin(seconds) * 100 dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, "canakkale1.png", 0, 0, tocolor( 255, 255, 255 ) ) for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, 20000, 1) end setTimer(respawnVehicles, 10000, 0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end ------------------------------------------------------- -----------server----------- function respawnExplodedVehicle() setTimer(respawnVehicle, 5000, 1, source) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle) --------------------------------- -----------meta ----------- <meta> <script src="server.lua" type="server" /> <script src="client.lua" type="client" cache="false"/> <file src="canakkale.png" /> <file src="canakkale1.png" /> </meta>
  7. LO QUE PASA ES CUANDO SE EJECUTA CON EL TIME QUEDA DIRECTO EL TOXI NO SE COMO ASER Y ESCHO DE TODO NO ME FUNCIONA AYUDA PORFAVOR ESTA ES LA PAJINA PARA QUE LO CHEQUEN AYUDA https://community.multitheftauto.com/?p=resources&s=details&id=15445 ----SERVER--- function math.round(number, decimals, method) -- De la wiki decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end local explosiones = { -- Posición de las explosiones {2691.86, 2784.75, 59.02}, {2716.19, 2773.16, 74.83}, {2716.98, 2769.41, 53.08}, {2692.65, 2773.92, 40.15}, {2612.71, 2678.42, 30.00}, {2580.86, 2702.58, 24.84}, {2538.07, 2822.08, 11.66}, {2593.50, 2826.69, 11.45}, {2625.39, 2829.98, 28.71}, {2693.25, 2694.72, 28.50}, {2716.90, 2683.54, 32.09}, {2733.75, 2678.40, 62.65}, {2596.64, 2638.77, 82.87}, {2510.14, 2688.21, 59.54}, {2630.57, 2829.37, 50.60}, {2685.79, 2838.06, 24.07}, {2596.24, 2770.00, 23.82}, {2608.27, 2733.59, 28.56}, {2641.34, 2696.41, 25.82}, {2650.74, 2671.53, 38.53} } local sonidos = {"sounds/alert.mp3", "sounds/alert2.mp3"} -- Sonidos local timedOut = false -- Timer para que se inicie el evento una vez ejecutado el sonido local iniciado = false -- Si el evento esta iniciado local tickFin = false -- El milisegundo en el que terminará el evento function onStop() -- Si el resource se detiene, todo vuelve a la normalidad setWeather(0) resetSunColor() resetSkyGradient() resetWaterColor() end addEventHandler("onResourceStop", resourceRoot, onStop) function onJoin() -- Si alguien se conecta... if iniciado then -- Y el evento esta iniciado... local calculo = (math.abs(getTickCount()-tickFin))/1000 if calculo < 20 then -- Y el tiempo restante es menor a 20 segundos... outputChatBox("#AA0000¡¡Legaste muy tarde para el evento!! =(", source, 0,0,0,true) -- ¡Entonces no se ejecutará el evento en el cliente! else triggerClientEvent(source, "onToxicIniciarEvento", source, sonidos[math.random(1, #sonidos)], calculo) end end end addEventHandler("onPlayerJoin", root, onJoin) function cambiarSonidoTiempo(ms) -- Sincroniza el sonido de la alerta con la explosión if not timedOut then timedOut = setTimer(function() timedOut = false for _,tabla in ipairs(explosiones) do -- Crea la explosiones setTimer(createExplosion, math.random(250, 1000), 1, tabla[1], tabla[2], tabla[3], 7) end setTimer(function() -- Esto hace que la muerte por la explosión se relentice por medio segundo if col and isElement(col) then -- Y esto hace que cualquier persona dentro del colShape salga volando y se muera for k,thePlayer in pairs(getElementsWithinColShape(col, "player")) do -- Agarra a todos los jugadores dentro de la zona setElementVelocity(thePlayer, 0, 0, 20) -- Volar killPed(thePlayer) -- Y morir end for k,veh in pairs(getElementsWithinColShape(col, "vehicle")) do -- Agarra a todos los vehículos dentro de la zona setElementVelocity(veh, 0, 0, 10) -- Los hace volar blowVehicle(veh) -- Y explotar end destroyElement(col) -- Y luego se destruye por las dudas end end, 500, 1) end, ms, 1) end end addEvent("onClientToxicSonidoTiempo", true) addEventHandler("onClientToxicSonidoTiempo", root, cambiarSonidoTiempo) addEvent("onToxicSetElementHealth", true) addEventHandler("onToxicSetElementHealth", root, setElementHealth) -- Esto sirve para sincronizar el quitado del vida del cliente al servidor --[[function togEvento(thePlayer, cmd, tiempo) -- Tiempo en segundos local cuenta = getPlayerAccount(thePlayer) if not isGuestAccount(cuenta) and isObjectInACLGroup("user."..getAccountName(cuenta), aclGetGroup("Admin")) then -- Si el usuario tiene cuenta y es Admin if not iniciado then -- Y el evento no esta iniciado if not tiempo or not tonumber(tiempo) then outputChatBox("#AA0000No colocaste un tiempo, así que se puso automáticamente la duración a 900 segundos.", thePlayer, 0,0,0,true) outputChatBox("#AA0000Para colocar un tiempo usa: #FFFFFF/"..cmd.." <tiempo en segundos>", thePlayer, 0,0,0,true) tiempo = 900 end tickFin = getTickCount() + tiempo*1000 -- Este será el milisegundo final del evento iniciado = true -- Esto marca que el evento inicio col = createColSphere(2632.54, 2743.05, 23.82, 175) -- Esto crea la zona donde cualquier persona que se encuentre morirá al ocurrir la explosión triggerClientEvent(root, "onToxicIniciarEvento", thePlayer, sonidos[math.random(1, #sonidos)], tonumber(tiempo)) -- Esto avisa al cliente del evento outputServerLog(getPlayerName(thePlayer).." inició el Evento TOXIC con el comando /"..cmd.." "..tostring(tiempo)) -- Y esto deja un LOG para ver quien inicio el evento (logs/server.log) setTimer(function() -- Y esto lo finaliza al pasar el tiempo necesario iniciado = false tickFin = false end, tiempo*1000, 1) elseif not timedOut then -- O el evento ya se inició iniciado = false triggerClientEvent(root, "onToxicFinalizarEvento", thePlayer) else -- O el evento se esta iniciando (impaciente!) outputChatBox("#FF7500Espera a que ocurra la explosión para detener el evento.", thePlayer, 0,0,0,true) end end end addCommandHandler("toxic", togEvento)]] ------AQUI ESTA EL PROBLEMA NO ME FUNCIONA SE ACTIVA SI PERO NO SE DESACTIVA PARA ASI QUE SE ACTIVE MEDIA ORA --- function chequearTiempo() -- Esto debería de hacer que el evento se ejecute los domingos a las 3 de la tarde, más info: https://wiki.multitheftauto.com/wiki/GetRealTime local tiempoReal = getRealTime() if tiempoReal.hour == 15 and tiempoReal.minute == 0 and tiempoReal.weekday == 0 not iniciado then -- Que sean las 3 de la tarde, el domingo y que no este iniciado local tiempo = 3600 -- Una hora son 3600 segundos tickFin = getTickCount() + tiempo*1000 iniciado = true col = createColSphere(2632.54, 2743.05, 23.82, 175) triggerClientEvent(root, "onToxicIniciarEvento", resourceRoot, sonidos[math.random(1, #sonidos)], tonumber(tiempo)) setTimer(function() iniciado = false tickFin = false end, tiempo*1000, 1) outputServerLog("¡El evento TOXIC se inicio de forma automático!") end end setTimer(chequearTiempo, 10000, 0)
  8. como poner una notificación al Respawn_Autos y no salga en chat del juego server : function respawnExplodedVehicle() setTimer(respawnVehicle, 5000, 1, source) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle) ---------------------------------------------------------------------------------------------------------------------------------- el otro lua server _: function respawnVehicles() outputChatBox ( "Legends// los vehiculos respawnearan en 20 segundos" ) setTimer(function () local vehicles = getElementsByType ( "vehicle" ) outputChatBox ( "Legends// vehiculos respawneados" ) for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, 20000, 1) end setTimer(respawnVehicles, 1000000, 0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
×
×
  • Create New...