Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/08/21 in all areas

  1. We'd like to thank all the livestream viewers around the world for joining us last night on our community livestream on Twitch, YouTube, Discord and Facebook! It was fun talking to you and playing on different MTA servers with you guys We're interested to hear feedback from you on how did we do, what could we improve and what went well. If you have server recommendations or ideas for future streams, feel free to post them in this topic as well. So far many of you have been interested in development related livestreams. We will ask around who would be interested in streaming those! If you couldn't make it to the livestream last night, or you'd like to replay the livestream, you can still watch our recording on Twitch and YouTube. The recordings may become unavailable at some point. See you next time!
    1 point
  2. OK glad to hear it worked out for you.
    1 point
  3. addEventHandler("onResourceStart",resourceRoot, function() local IP = getServerConfigSetting("serverip") -- puxa o IP do servidor local Script = getResourceName(getThisResource()) if isObjectInACLGroup( "resource." .. Script, aclGetGroup ( "Admin" ) ) then -- Verifica se o script está na ACL ADM ProtecaoConnect = dbConnect( "mysql", "dbname=NOME DO BANCO DE DADOS;host=URL OU IP DE CONEXÃO", "USUÁRIO", "SENHA" ) local Dados = dbPoll(dbQuery(ProtecaoConnect, "SELECT * FROM (Tabela que contém os ips) WHERE IP = ?", IP), -1) -- Puxa os dados de IPS if type ( Dados ) == 'table' and #Dados == 0 or not Dados then -- Se não houver resultado para o IP ele da stop no script outputDebugString("#33FF58[PROTEÇÃO] #DA1B1BEndereço IP Não autorizado!") stopResource(getThisResource()) else -- Caso o resultado retorne igual a 1 (O Ip estiver na db) então ele autoriza o script outputDebugString("#33FF58[PROTEÇÃO] #DA1B1BEndereço IP Autorizado com #33FF58sucesso#DA1B1B!") end else outputDebugString("Adicione o resource a ACL ADMIN para utilizar!") cancelEvent(true) end end) -- Necessário colocar o script na acl ADM para iniciar. -- Verificação simples que checa a conexão com o banco de dados function checkConnection() if not ProtecaoConnect then outputDebugString("Não foi possível verificar a conexão MYSQL com a proteção, o script será encerrado!") stopResource(getThisResource()) end end setTimer(checkConnection, 60000, 0) Basta criar o banco de dados e adicionar os endereços IP que deseja, ele verifica se o IP está na tabela, se não estiver cancela o script. Se ajudei, de um agradecimento, tmj.
    1 point
  4. This crash is caused by running out of video memory. https://wiki.multitheftauto.com/wiki/Famous_crash_offsets_and_their_meaning, Ctrl+F and search for 0x003C91CC. Most likely some script creates textures (fonts, etc), but does not remove them when they are not needed. Or it does not check that some element already exists. How can this be monitored: There is a showmemstat command that displays the free video memory for MTA and how much is used by fonts, textures, RTs (+ Screen Sources); There is a function dxGetStatus, which allows you to monitor this with a script. How to know which resource is using a texture/font/etc: 2 options: the performancebrowser resource that allows you to monitor the performance in the browser and the ipb resource that allows you to do it directly in the game. Then you need to select the Lua memory category and specify Client as the target*. By columns DxFonts (= dxCreateFont), GuiFonts (= guiCreateFont), Textures (= dxCreateTexture), RenderTargets (= dxCreateRenderTarget) and ScreenSources (= dxCreateScreenSource) you can understand whether there is a memory leak or not. *You can select any client only in the browser.
    1 point
  5. We also have a Discord server where you could ask for help! https://discord.gg/mtasa I have closed your thread as requested.
    1 point
×
×
  • Create New...