Jump to content

Search the Community

Showing results for 'download' in content posted in Programação em Lua.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Existe isso? é possivel fazer um script que remova a barra de download quando o jogador estiver logado? Sempre que dou restart em um mod que possui mapas, ele começa a carregar aquela barra padrão mostrando quandos kb está sendo baixado, queria saber se é possível retirar isso para todos através de um script
  2. Olá, estou desenvolvendo um emprego de açougueiro e vi que não existe por padrão o objeto do facão do mta gostaria de saber se existe algum disponivel pra download e qual função eu tenho que usar para detectar a colisão do facão batendo no objeto da Carne ( no caso será a carne pendurada ), desde já muito obrigado!
  3. Olá, como faço uma tela de download e que ela funcione só quando o jogador estiver fazendo o download dos resources pela primeira vez, e que ela só funcione somente até você fazer o login, se conseguirem explicar eu agradeço, sou leigo no assunto..
  4. Bom galera, seguinte, eu vi que em quase todas as hospedagens tem esse tal de "compactador de downloads". Eu possuo um dedicado que uso pra servidores de jogos, então não tenho necessidade de pagar host ainda mais pq a qualidade e uma ***. Minha dúvida é, como eu faço pra colocar esse sistema de compactação ? eu teria de instalar uma interface web pelo apache2/ngnix ? alguém sabe me informar ?
  5. Boa Noite, Queria saber que função devo usar para colocar imagens ou mensagem quando o jogador ta fazendo download do servidor.? vio em alguns servidores e queria fazer no meu. so que nao sei qual as função que devo usar. Obrigado
  6. BOA NOITE, Pessoal queria saber qual função devo usar para construir um script que identifica quando o player termina de baixar o servidor por completo? O problema que to enfrentado é que os players baixa uma parte de MB do servidor e quando entra de volta aparece a tela de login, e o player consegue jogar com o servidor fazendo download. Como posso corrigir isso?
  7. Eu queria criar um download Personalizado ! como que faz pra criar um Download Personalizado ou mesmo com você entra no servidor fica aquela bolinha rodando com MB ? PODE SER COM IMAGENS OU MUSICA !?
  8. Eu gostaria de saber quando a pessoa tivesse em download a tela dela ficasse toda preta. E também o radar sumir quando n tiver dentro de um carro.
  9. Como eu faria aparecer um dx na minha tela quando eu estiver em download, e quando acabar o download ele sumir ?
  10. Eu queria criar um download Perssonalizado, Pois servidores Grandes com Muitos mods Pesando 200MB! E O Meu com mods Rasoaveis pesando 400MB. Em Fim, como que faz pra criar um Download Perssonalizado ?!
  11. Bom dia Pessoal nao consegui resolver o seguinte erro: #1011 External HTTP file mismatch (Retrying this file with internal HTTP) [admin\client\admin_gui.Lua] ja procurei de tudo e ainda continua o erro o que pode ser isso
  12. painel que eu quero se possivel manda o link de download https://prnt.sc/onyio5 https://prnt.sc/onyio5 https://prnt.sc/onyio5
  13. Gostaria de saber como posso fazer para colocar uma imagem na tela de download, ai quando o player estiver fazendo os downloads necessário para entrar no servidor a imagem fique la aparecendo.
  14. Como posso criar uma tela de login estilo infinity ou destiny com trocas imagens(rodando etc) tenho que fazer em dx ou html?
  15. pretendo colocar ele como if pra so aparecer a tela de download quando alguem nao ta logado tentei colocar a prioridade de download no meta mas n foi
  16. Tem sim, você consegue ativar ou desativar via script usando setTransferBoxVisible(). essa é uma função Shared, então você pode fazer uma verificação server-side se o jogador estiver logado e fazer uma trigger para desativar se ele estiver. Esse script deve esconder a barra de download sempre que o player estiver online e para qualquer resource iniciada. Server-side: addEventHandler('onResourceStart', root, function(resource) local players = getElementsByType('player') for i, j in pairs(players) do if not isGuestAccount(getPlayerAccount(j)) then triggerClientEvent(j, 'esconde', resourceRoot()) end end end) Client-Side: addEvent('esconde', true) addEventHandler('esconde', root, function() setTransferBoxVisible(false) end)
  17. como faço para substituir a tela de carregamento do mta por uma imagem qualquer, quando você entra em um servidor fica uma barrinha branca e um circulo pequeno girando, queria tirar isso e colocar imagens ou video, da uma força ai, por onde começo
  18. Estou recebendo este erro ao tentar carregar uma imagem: Download error: HTTP server file mismatch! ([wid]login) loadscreen-c.lua [Got size:55 MD5:8D90FFA9DF5843E27FB4BCEFC1253555, wanted MD5:16CBA42D0ACCB3C44EF005EF1E1B4EF9] Meu código: local screenW, screenH = guiGetScreenSize() function Loadscreen() local backgroundImage = '../image/background.png' setPlayerHudComponentVisible('all', false) dxDrawImage(0, 0, screenW, screenH, backgroundImage) end addEventHandler('onClientRender', root, Loadscreen)
  19. Estou com esse problema a bastante tempo e nunca achei a solução, e é com todos Painéis de Login que da isso. Ocorre sempre quando um jogador baixa o resource (Painel de Login) pela primeira vez e da esses Avisos: DIAGNOSTIC: ~#Douglas #1012 External HTTP file download error:[500] Error downloading requested files. HTTP response code said error. [The requested URL returned error: 500 Internal Server Error] [Login-A/guest.png] (Disabling External HTTP) [Login-A\guest.png] DIAGNOSTIC: ~#Douglas #1012 External HTTP file download error:[500] Error downloading requested files. HTTP response code said error. [The requested URL returned error: 500 Internal Server Error] [Login-A/login_window.png] (Disabling External HTTP) [Login-A\login_bg.png] DIAGNOSTIC: ~#Douglas #1012 External HTTP file download error:[500] Error downloading requested files. HTTP response code said error. [The requested URL returned error: 500 Internal Server Error] [Login-A/register_window.png] (Disabling External HTTP) [Login-A\login_window.png] PS: Não mostra nenhum erro no debugscript
  20. Olá pessoal, Bom eu tenho uma dúvida, por exemplo: se eu compilar um arquivo client/server e mandar para o servidor principal e ficar no meu local com os arquivos descompilados, ele ira baixar novamente os arquivos client/server descompilados? pois eu fiz isso e quando eu entro no meu servidor hospedado que no caso é onde esta os arquivos compilados, ele baixa uma porcentagem pequena de download isso só acontece quando eu entro no server no localhost onde estão os arquivos descompilados. Se alguém poder me explicar melhor sobre isso agradeço.
  21. Olá, preciso de um suporte no .lua Então estou com uma dúvida em um painel,tipo eu fiz um painel de desativa o mod e ativar, eu percebi que eu preciso usar a função onResourceStart,mais como faço para por o nome da pasta que vai ser desativa,alguém me manda a função completa. onResourceStart
  22. Gostaria de saber se há como bloquear para não salvar arquivos .DFF e .TXD na pasta de cache do cliente, como exemplo carros e texturas de modelagens andei pesquisando mas não encontrei muito a respeito para sanar de fato essa duvida Sabemos que mesmo compilando o arquivo é possível o player usar a .TXD e DFF então ignoremos essa opção fiquei hesitando em usar o download"false" e é o que de fato estou testando agora - não testei ainda -, seria essa uma opção alternável? PS: A função download indo no meta.xml não funciona. torna a deixar os arquivos oriundos do GTA SA. Seria a única forma uma proteção de código com licença?
  23. Até onde eu sei, não tem como. O que eu recomendo fazer é colocar download="false" no arquivo meta para que o arquivo não baixe automaticamente Por exemplo: <file src="biz.txd" download="false"/> <file src="biz.dff" download="false"/> e depois usar o downloadFile para baixar o arquivo e o evento onClientFileDownloadComplete para realizar uma ação assim que o arquivo é baixado (pode usar isso para criar uma interface gráfica para mostrar o progresso do download dos seus arquivos) Por exemplo: downloadFile ("biz.dff") downloadFile ("txd.dff") function onDownloadFinish ( file, success ) if ( success ) then outputChatBox ('O arquivo '..file..' foi baixado com sucesso.') else outputChatBox ('Erro ao baixar o arquivo '..file) end end addEventHandler ( "onClientFileDownloadComplete", root, onDownloadFinish )
  24. local sx, sy = guiGetScreenSize() local queue = {} local modQueue = {} local progress = 0 local downloadSize = 0 local modsSize = 0 local scriptVersion = 1.1 local canShowThe:OingGUI = false local window, language, guiColorR, guiColorG, guiColorB local gridClicked = 0 local gridCache = 1 local gridRows = 10 addEvent(resname .. ":startDownload", true) addEventHandler(resname .. ":startDownload", localPlayer, function(table, size, lang, colorR, colorG, colorB) queue = table language = lang guiColorR, guiColorG, guiColorB = colorR, colorG, colorB for index = 1, #queue do local data = queue[index] if fileExists(data[1]) then local cf = fileOpen(data[1]) local cfSize = fileGetSize(cf) if cfSize ~= data[3] then fileDelete(cf) else size = size - cfSize fileClose(cf) end end end modsSize = size if modsSize > 0 then window = "request" showCursor(true) downloadButton = guiCreateButton((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, "", false) guiSetAlpha(downloadButton, 0) cancelButton = guiCreateButton((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, "", false) guiSetAlpha(cancelButton, 0) addEventHandler("onClientGUIClick", root, function() if source == downloadButton then showCursor(false) destroyElement(downloadButton) destroyElement(cancelButton) window = nil download() elseif source == cancelButton then for index = 1, #queue do local data = queue[index] if not fileExists(data[1]) then queue[index] = nil end end showCursor(false) destroyElement(downloadButton) destroyElement(cancelButton) window = nil download() end end ) else download() end end ) function download() if #queue >= 1 then downloadFile(queue[#queue][1]) else queue = {} modsSize = 0 downloadSize = 0 progress = 0 canShowThe:OingGUI = true end end function calculateW(w, progress) if w and progress then local w = w-2 local width = ((w*progress)/100) return width end return false end local lastUpdate = 0 local lastName = "" function updateDownloadSize(size) if lastName == queue[#queue] then downloadSize = (downloadSize-lastUpdate) + size else downloadSize = downloadSize + size end lastName = queue[#queue] lastUpdate = size end addEventHandler("onClientRender", root, function() if #queue ~= 0 then if window == "request" then dxDrawRectangle((520/1366)*sx, (267/768)*sy, (307/1366)*sx, (125/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawRectangle((520/1366)*sx, (267/768)*sy, (307/1366)*sx, (23/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawText("AFK Mod Downloader v" .. scriptVersion, (520/1366)*sx, (267/768)*sy, (827/1366)*sx, (290/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(translations[language].request_firstText .. "\n" .. translations[language].request_secondText .. ": " .. sizeFormat(modsSize), (520/1366)*sx, (295/768)*sy, (827/1366)*sx, (338/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, true, true, false, false) if getKeyState("mouse1") and isCursorHover((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy) then dxDrawRectangle((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 50), true) dxDrawText(translations[language].request_downloadButton, (534/1366)*sx, (347/768)*sy, (643/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) elseif isCursorHover((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy) then dxDrawRectangle((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 100), true) dxDrawText(translations[language].request_downloadButton, (534/1366)*sx, (347/768)*sy, (643/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 200), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((535/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 150), true) dxDrawText(translations[language].request_downloadButton, (534/1366)*sx, (347/768)*sy, (643/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end if getKeyState("mouse1") and isCursorHover((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy) then dxDrawRectangle((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 50), true) dxDrawText(translations[language].request_cancelButton, (707/1366)*sx, (347/768)*sy, (816/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) elseif isCursorHover((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy) then dxDrawRectangle((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 100), true) dxDrawText(translations[language].request_cancelButton, (707/1366)*sx, (347/768)*sy, (816/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 200), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((708/1366)*sx, (348/768)*sy, (107/1366)*sx, (34/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 150), true) dxDrawText(translations[language].request_cancelButton, (707/1366)*sx, (347/768)*sy, (816/1366)*sx, (380/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end else if fileExists(queue[#queue][1]) then openedFile = fileOpen(queue[#queue][1]) if openedFile then local fileSize = fileGetSize(openedFile) fileClose(openedFile) updateDownloadSize(fileSize) end end dxDrawRectangle((413/1366)*sx, (599/768)*sy, (548/1366)*sx, (118/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawRectangle((413/1366)*sx, (599/768)*sy, (548/1366)*sx, (23/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawText("AFK Mod Downloader v" .. scriptVersion, (412/1366)*sx, (599/768)*sy, (961/1366)*sx, (622/768)*sy, tocolor(255, 255, 255, 254), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(translations[language].firstText .. "\n" .. translations[language].secondText .. ": " .. queue[#queue][1]:gsub("files/", ""), (412/1366)*sx, (622/768)*sy, (961/1366)*sx, (666/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) local x, y, w, h = (421/1366)*sx, (673/768)*sy, (532/1366)*sx, (34/768)*sy progress = ((downloadSize*100)/modsSize) local width = calculateW(w, progress) dxDrawRectangle(x, y, w, h, tocolor(0, 0, 0, 200), true) dxDrawRectangle(x+1, y+1, w-2, h-2, tocolor(guiColorR, guiColorG, guiColorB, 50), true) dxDrawRectangle(x+1, y+1, width, h-2, tocolor(guiColorR, guiColorG, guiColorB, 150), true) dxDrawText(sizeFormat(downloadSize) .. "/" .. sizeFormat(modsSize) .. " (" .. math.floor(progress) .. "%)", x, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end end if window == "select" then dxDrawRectangle((431/1366)*sx, (164/768)*sy, (502/1366)*sx, (366/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawRectangle((431/1366)*sx, (164/768)*sy, (502/1366)*sx, (23/768)*sy, tocolor(0, 0, 0, 150), true) dxDrawRectangle((573/1366)*sx, (196/768)*sy, (351/1366)*sx, (276.5/768)*sy, tocolor(0, 0, 0, 176), true) dxDrawText("AFK Mod Downloader v1.1", (430/1366)*sx, (162/768)*sy, (933/1366)*sx, (187/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) if isCursorHover((440/1366)*sx, (197/768)*sy, (112/1366)*sx, (36/768)*sy) then dxDrawRectangle((440/1366)*sx, (197/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 180), true) dxDrawText(translations[language].gui_activateSelected, (439/1366)*sx, (197/768)*sy, (552/1366)*sx, (233/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((440/1366)*sx, (197/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 200), true) dxDrawText(translations[language].gui_activateSelected, (439/1366)*sx, (197/768)*sy, (552/1366)*sx, (233/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end if isCursorHover((440/1366)*sx, (243/768)*sy, (112/1366)*sx, (36/768)*sy) then dxDrawRectangle((440/1366)*sx, (243/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 180), true) dxDrawText(translations[language].gui_desactiveSelected, (439/1366)*sx, (243/768)*sy, (552/1366)*sx, (279/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((440/1366)*sx, (243/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 200), true) dxDrawText(translations[language].gui_desactiveSelected, (439/1366)*sx, (243/768)*sy, (552/1366)*sx, (279/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end if isCursorHover((440/1366)*sx, (291/768)*sy, (112/1366)*sx, (36/768)*sy) then dxDrawRectangle((440/1366)*sx, (291/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 180), true) dxDrawText(translations[language].gui_activeAll, (439/1366)*sx, (291/768)*sy, (552/1366)*sx, (327/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((440/1366)*sx, (291/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 200), true) dxDrawText(translations[language].gui_activeAll, (439/1366)*sx, (291/768)*sy, (552/1366)*sx, (327/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end if isCursorHover((440/1366)*sx, (337/768)*sy, (112/1366)*sx, (36/768)*sy) then dxDrawRectangle((440/1366)*sx, (337/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 180), true) dxDrawText(translations[language].gui_disAll, (439/1366)*sx, (337/768)*sy, (552/1366)*sx, (373/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((440/1366)*sx, (337/768)*sy, (112/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 200), true) dxDrawText(translations[language].gui_disAll, (439/1366)*sx, (337/768)*sy, (552/1366)*sx, (373/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end if isCursorHover((594/1366)*sx, (483/768)*sy, (175/1366)*sx, (36/768)*sy) then dxDrawRectangle((594/1366)*sx, (483/768)*sy, (175/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 180), true) dxDrawText(translations[language].gui_close, (594/1366)*sx, (483/768)*sy, (769/1366)*sx, (519/768)*sy, tocolor(255, 255, 255, 150), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) else dxDrawRectangle((594/1366)*sx, (483/768)*sy, (175/1366)*sx, (36/768)*sy, tocolor(guiColorR, guiColorG, guiColorB, 200), true) dxDrawText(translations[language].gui_close, (594/1366)*sx, (483/768)*sy, (769/1366)*sx, (519/768)*sy, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "center", "center", false, false, true, false, false) end y = (197/768)*sy for index = gridCache, (gridCache+gridRows) do local mods = modQueue[index] if index <= #modQueue then x, y, w, h = (574/1366)*sx, y, (349/1366)*sx, (24/768)*sy if gridClicked == index then dxDrawRectangle(x, y, w, h, tocolor(guiColorR, guiColorG, guiColorB, 255), true) if isVehicle(tonumber(mods[2])) then dxDrawText(mods[3] .. " (" .. getVehicleNameFromModel(tonumber(mods[2])) .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) elseif isSkin(tonumber(mods[2])) then dxDrawText(mods[3] .. " (Skin " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) else dxDrawText(mods[3] .. " (Object " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) end elseif isCursorHover(x, y, w, h) and gridClicked ~= index then dxDrawRectangle(x, y, w, h, tocolor(guiColorR, guiColorG, guiColorB, 100), true) if isVehicle(tonumber(mods[2])) then dxDrawText(mods[3] .. " (" .. getVehicleNameFromModel(tonumber(mods[2])) .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 155), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) elseif isSkin(tonumber(mods[2])) then dxDrawText(mods[3] .. " (Skin " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 155), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) else dxDrawText(mods[3] .. " (Object " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 155), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) end if getKeyState("mouse1") then gridClicked = index end else dxDrawRectangle(x, y, w, h, tocolor(guiColorR, guiColorG, guiColorB, 50), true) if isVehicle(tonumber(mods[2])) then dxDrawText(mods[3] .. " (" .. getVehicleNameFromModel(tonumber(mods[2])) .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) elseif isSkin(tonumber(mods[2])) then dxDrawText(mods[3] .. " (Skin " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) else dxDrawText(mods[3] .. " (Object " .. mods[2] .. ")" .. " - " .. (mods[4] and tostring(translations[language].gui_enableState) or tostring(translations[language].gui_disableState)), x+(5/1366)*sx, y, w+x, h+y, tocolor(255, 255, 255, 255), (1/1366)*sx, "default-bold", "left", "center", false, false, true, false, false) end end y = y + (25/768)*sy end end end end ) addEventHandler("onClientFileDownloadComplete", root, function(file) if duplicates(queue[#queue][2], modQueue) then table.insert(modQueue, {queue[#queue][1], queue[#queue][2], queue[#queue][4], false}) end table.remove(queue, #queue) download() end ) addCommandHandler("mods", function() if canShowThe:OingGUI then if window ~= "select" then window = "select" gui_closeButton = guiCreateButton((594/1366)*sx, (483/768)*sy, (175/1366)*sx, (36/768)*sy, "", false) guiSetAlpha(gui_closeButton, 0) gui_activeSelected = guiCreateButton((440/1366)*sx, (197/768)*sy, (112/1366)*sx, (36/768)*sy, "", false) guiSetAlpha(gui_activeSelected, 0) gui_desactiveSelected = guiCreateButton((440/1366)*sx, (243/768)*sy, (112/1366)*sx, (36/768)*sy, "", false) guiSetAlpha(gui_desactiveSelected, 0) gui_activeAll = guiCreateButton((440/1366)*sx, (291/768)*sy, (112/1366)*sx, (36/768)*sy, "", false) guiSetAlpha(gui_activeAll, 0) gui_desactiveAll = guiCreateButton((440/1366)*sx, (337/768)*sy, (112/1366)*sx, (36/768)*sy, "", false) guiSetAlpha(gui_desactiveAll, 0) showCursor(true) addEventHandler("onClientGUIClick", root, function() if source == gui_activeSelected then if gridClicked > 0 then if modQueue[gridClicked][4] == false then local filePath = modQueue[gridClicked][1]:gsub(".txd", ""):gsub(".dff", "") local model = modQueue[gridClicked][2] if fileExists(filePath .. ".txd") then modQueue[gridClicked][4] = true local txd = engineLoadTXD(filePath .. ".txd") engineImportTXD(txd, model) end if fileExists(filePath .. ".dff") then modQueue[gridClicked][4] = true local dff = engineLoadDFF(filePath .. ".dff") engineReplaceModel(dff, model) end end end elseif source == gui_desactiveSelected then if gridClicked > 0 then if modQueue[gridClicked][4] == true then local model = modQueue[gridClicked][2] modQueue[gridClicked][4] = false engineRestoreModel(model) end end elseif source == gui_activeAll then for _, data in ipairs(modQueue) do if data[4] == false then local filePath = data[1]:gsub(".txd", ""):gsub(".dff", "") local model = data[2] if fileExists(filePath .. ".txd") then data[4] = true local txd = engineLoadTXD(filePath .. ".txd") engineImportTXD(txd, model) end if fileExists(filePath .. ".dff") then data[4] = true local dff = engineLoadDFF(filePath .. ".dff") engineReplaceModel(dff, model) end end end elseif source == gui_desactiveAll then for _, data in ipairs(modQueue) do if data[4] == true then data[4] = false engineRestoreModel(data[2]) end end elseif source == gui_closeButton then destroyElement(gui_closeButton) destroyElement(gui_activeSelected) destroyElement(gui_desactiveSelected) destroyElement(gui_activeAll) destroyElement(gui_desactiveAll) window = nil gridClicked = 0 gridCache = 1 showCursor(false) end end ) end end end ) bindKey( "mouse_wheel_up", "down", function () if #modQueue >= gridRows + 1 then gridCache = math.max(gridCache - 1, 1) end end ) bindKey( "mouse_wheel_down", "down", function () if #modQueue >= gridRows + 1 then gridCache = math.min(gridCache + 1, #modQueue-gridRows) end end ) Esse é o painel de ligar ou desligar mods, conhecido como modloader, o meu painel ao digitar o comando /mods era pra ele abrir só que n ta abrindo e já tou a 2 horas tentando achar o erro do porque não ta abrindo digitando o seguinte comando que é /mods ... alguem com mais experiencia poderia me da uma ajuda ?
×
×
  • Create New...