Jump to content

DeathMta

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by DeathMta

  1. osea mas claro : uno usuario "x" abre un panel "x", al presionar un boton , se destruya y pase un tiempo y se cree de nuevo el boton. use el guisetenable , pero lo bloquea cuando el panel esta abierto , y al usar un settimer con el guisetenable , cuenta el tiempo cuando el panel esta abierto mas no cerrado no se si me dejo entender
  2. eso esta bien pero quiere que cuente el tiempo cuando cierra el panel osea mira algo asi: presiona el boton , luego lo cierra , aunque este abierto o no que pase el tiempo .
  3. claro lo use pero al reabrir mi panel el guisetenable no funciona
  4. BUENAS ANDO CREANDO UNA GUI DE UN PANEL Y QUIERO QUE UN BOTON SE ELIMINE POR 4 MINUTOS Y VUELVA A APARECER trato de integrar esto a mi boton function guiFade( gui, state ) if state == "in" then -- This state will fade IN the GUI fadeIn = setTimer(guiFade, 50, 1, gui, state) -- We loop the function to make it lower the alpha each 50 ms alpha = guiGetAlpha(gui) -- We get the GUI's actual alpha after each loop guiSetAlpha(gui, alpha - 0.1) -- We set the GUI's actual alpha after each loop if alpha == 0 then -- If the loop reached "0"... guiSetVisible(gui, false) -- We set the GUI visibility to 0 so it won't be clickable or editable killTimer(fadeIn) -- ... We kill the timer fadeIn = nil -- And to make sure it doesn't exist anymore, we set it to nil end elseif state == "out" then -- This state will fade OUT the GUI guiSetVisible(gui, true) -- Since the GUI will still be click-able, we'll set it's visibility to "false" fadeOut = setTimer(guiFade, 50, 1, gui, state) -- We loop the function to make it higher the alpha each 50 ms alpha = guiGetAlpha(gui) -- We get the GUI's actual alpha after each loop guiSetAlpha(gui, alpha + 0.1) -- We set the GUI's actual alpha after each loop if alpha == 1 then -- If the loop reached "1"... killTimer(fadeOut) -- ... We kill the timer fadeOut = nil -- And to make sure it doesn't exist anymore, we set it to nil end end end a este boton : function FuncionMuniciones () showCursor (true) playSound("sonidos/sonidobronce.wav") triggerServerEvent ( "CuandoCliqueaMuniciones", getLocalPlayer()) end
  5. grax no me di cuenta en los exports ;v
  6. https://community.multitheftauto.com/in ... ls&id=4871 y ese?
  7. mejor : con que tecla o comando se abre el dx gui
  8. HOLA A TODOS , ME PREGUNTO COMO SE ABRE EL DX GUI? HE BUSCANDO EN TODOS LOS LUAS Y NO HAY NINGUN BINDKEY NI UN ADDCOMMANDHANDLER ALGUIEN ME AYUDA?
  9. pero usa la misma logica que del export
  10. Si no se establece el grupo de prioridad de descarga de un recurso por defecto es 0. Si se establece mayor que 0, entonces el recurso se descargara. esto es para descargar primero Si se establece en menos de 0, el recurso se descargará y se puso en el cliente más tarde que otros recursos. descarga primero-- 1 despues del 1-- 0
  11. elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local lvl = getElementData( source, "level" ) local r, g, b = getPlayerNametagColor( source ) local clan = getElementData(source, "gang" ) if ( clan ~= "None" ) then tagclan = "#FFFFFF[" .. clan .. "] " else tagclan = "" end outputChatBox( tagclan.. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [user] " .. getPlayerName ( source ) .. ": " .. text)
  12. exports.gang_system:getPlayerGang ( source) en vez de usar eso por que no usas esto? getElementData(source, "gang" )
  13. you use this panel to privatize: if getElementData(source, "gang" ) == "your gang" then
  14. tiburon? con que clase de vehiculo piensas hacer eso?
  15. no entiendo esa linea , para que sirve? , un jugador deberia saber si tecleas charlotte te sale ese output? , como lo sabra? ah y para el antispam mejor usa algo con antispam= true luego de un tiempo le pones un false ,creo que me entiendes DXd
  16. I mean that in a timeout to put a command function CurarseAdmin (player) local Cuenta = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ("user."..Cuenta, aclGetGroup ("Admin") and aclGetGroup ("SuperModerator") and aclGetGroup ("Moderator") and aclGetGroup ("Console")) then setElementData(player, "blood", 100000000 ) setElementData(player,"food",100) setElementData(player,"thirst",100) setElementData(player,"brokenbone",false) setElementData(player,"bleeding",0) setElementData(player,"pain",false) exports [ "errorinfowindow" ]:show (player,"info","Te Has Curado En Todo.",2000,"[staff]: Informacion",false) else exports [ "errorinfowindow" ]:show (player,"info","Acceso Restringido.",2000,"[staff]: Informacion",false) end end addCommandHandler ("curarse",CurarseAdmin) by putting the command has a timeout
  17. Hello! I wonder how to make a button for a particular antispam and antispam for commands
  18. amigo es del bug esta en el survivorsystem .lua reemplaza estas lineas : nil, false, false, nil, false por esta : -1, false, false, false, false dame 10 puntos plis
  19. este es un hud simple que hize para la comunidad y +10 puntos plis Caracteristicas : -Te muestra la velocidad de tu auto -Nuevos Nombres De Autos -Version Beta -Te Muestra el interior(partes del auto). -Nombre Del Auto -Script tipo Client-side -Multiresoluciones Autos = { ["Infernus"] ="Bugatti Veyron", ["Patriot"] ="Hummer H3", ["Sanchez"] = "Sanchez", ["Barracks"] = "Barracks", ["Bullet"] = "Ford Mustang", ["Rustler"] = "Avioneta", ["Maverick"] = "Maverick", ["Bobcat"] = "Bob Cat", ["Taxi"] = "Taxi", ["Freeway"] = "Free Way", ["Sandking"] = "Furgoneta", ["Tractor"] = "Tractor Campestre", ["Police Maverick"] = "Maverick Policial", ["Bandito"] = "Bandito", ["Ambulance"] = "Ambulancia", ["Police SF"] = "Auto Policial", ["Quadbike"] = "Cuatri Moto", ["Seasparrow"] = "Heli Kill", ["Monster 1"] = "Camion Monstruo", ["Clover"] = "Doge Challegend", ["Rhino"] = "Tanque Militar", ["NRG-500"] = "Kawasaki K23" } function HudAuto() local auto = getPedOccupiedVehicle(getLocalPlayer()) if auto then local x , y = guiGetScreenSize() local motor = getElementData(getElementData(auto,"parent"),"Engine_inVehicle") or 0 local rueda = getElementData(getElementData(auto,"parent"),"Tire_inVehicle") or 0 local tanque = getElementData(getElementData(auto,"parent"),"Parts_inVehicle") or 0 local rueda1 = getElementData(auto,"needtires") local motor1 = getElementData(auto,"needengines") local tanque1 = getElementData(auto,"needparts") local maxfuel = getElementData(auto,"maxfuel") local fuel = getElementData(getElementData(auto,"parent"),"fuel") dxDrawLine((16/1024)*x, (359/768)*y, (16/1024)*x, (520/768)*y, tocolor(50,199,42), 2, false) dxDrawLine((234/1024)*x, (374/768)*y, (16/1024)*x, (374/768)*y, tocolor(50,199,42), 2, false) dxDrawLine((16/1024)*x, (522/768)*y, (234/1024)*x, (522/768)*y, tocolor(50,199,42), 2, false) dxDrawLine((234/1024)*x, (522/768)*y, (234/1024)*x, (359/768)*y,tocolor(50,199,42), 2, false) dxDrawLine((16/1024)*x, (359/768)*y, (234/1024)*x, (359/768)*y, tocolor(50,199,42), 2, false) dxDrawRectangle((17/1024)*x, (375/800)*y, (217/1024)*x, (161/768)*y, tocolor(44, 43, 43, 173), false) dxDrawText(" "..Autos[tostring(getVehicleName(auto))].."", (49/1024)*x, (374/800)*y, (189/1024)*x,(385/768)*y, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, false, false, false) if rueda == rueda1 then r,g,b = 13,255,0 else r,g,b = 255, 0, 0 end dxDrawText("Ruedas: "..rueda..'',(18/1024)*x, (398/800)*y, (107/1024)*x,( 427/768)*y, tocolor(r,g,b), 1, "default-bold", "left", "top", false, false, false, false, false) if motor == motor1 then r,g,b = 13,255,0 else r,g,b = 255, 0, 0 end dxDrawText("Motores: "..motor..'', (117/1024)*x, (398/800)*y, (206/1024)*x, (427/768)*y, tocolor(r, g, b), 1, "default-bold", "left", "top", false, false, false, false, false) if fuel == maxfuel then r, g, b = 0, 255, 0 elseif fuel < maxfuel / 10 then r, g, b = 255, 0, 0 elseif fuel < maxfuel / 4 then r, g, b = 255, 50, 0 elseif fuel < maxfuel / 3 then r, g, b = 200, 100, 0 elseif fuel < maxfuel / 2 then r, g, b = 125, 200, 0 elseif fuel < maxfuel / 1.5 then r, g, b = 50, 200, 0 end dxDrawText("Gasolina:"..math.floor(fuel).."", (17/1024)*x, (437/800)*y, (106/1024)*x, (466/768)*y, tocolor(r, g, b), 1, "default-bold", "left", "top", false, false, false, false, false) if tanque == tanque1 then r,g,b = 13,255,0 else r,g,b = 255, 0, 0 end dxDrawText("Tanque: "..tanque..'',( 117/1024)*x, (437/800)*y, (206/1024)*x, (466/768)*y, tocolor(r, g, b), 1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..formatovec(math.round(getVehicleSpeed())).." Km/h", (25/1024)*x, (484/800)*y, (166/1024)*x, (520/768)*y, tocolor(0, 255, 0), 1.2, "default-bold", "left", "top", false, false, false, false, false) end end addEventHandler("onClientRender",getRootElement(),HudAuto) function getVehicleSpeed() local player = getLocalPlayer() local target = getCameraTarget() if isElement(target) then if getElementType(target) == "vehicle" then target = getVehicleController(target) end player = target end local sx, sy, sz = getElementVelocity(getPedOccupiedVehicle(player)) local speed = math.sqrt(sx ^ 2 + sy ^ 2 + sz ^ 2) return speed * 181 end function math.round(float) return math.floor(float + 0.5) end function formatovec(speed) speed = tonumber(speed) if speed < 10 then speed = "" .. speed elseif speed < 100 then speed = "" .. speed elseif speed < 1000 then elseif speed >= 1000 then speed = "999" end return speed end
  20. ando creando un hud de autos muy simple para mta dayz en unos dias lo subo para todos
×
×
  • Create New...