Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 13/04/24 in Posts

  1. Out of video memory. This can happen on servers with unoptimized mods and (faulty) scripts that abuse video memory, or even when you have a powerful graphics card in case the stuff on a server is extremely unoptimized so that it starts hitting GTA limits. If you have a powerful graphics card and more players suffer from this crash type, inform the server owner of this problem as it probably means their scripters & designers don't know what they are doing.
    1 point
  2. Please disregard the post above.. This is a working code ----server addCommandHandler("adminchat", function(player, _, ...) local account = getAccountName(getPlayerAccount(player)) --get the player account for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user." .. account, aclGetGroup("Staff")) then --- this section you can customize which ACL role they are. outputChatBox("#7D6608[Admin]#9A7D0A"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#7D6608: #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); --- thisplay chat you can customize as well. else outputChatBox("You don't have enough access to use this chat!") end end end ) ---client bindKey("h", "down", "chatbox", "adminchat"); Please hit like on 2 of my posts if these helped you
    1 point
  3. It should be possible, just a concept, not sure it works with this code, but you can modify the rest. --- server addCommandHandler("adminchat", function(player, _, ...) for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..account,aclGetGroup("Staff")) then --- uses ACL to determine who is able use. if (getElementData(v, "adminchat") == getElementData(player, "adminchat")) then outputChatBox("#7D6608[Admin]#9A7D0A"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#7D6608: #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); end end end end); --- client bindKey("u", "down", "chatbox", "adminchat");
    1 point
  4. @JPzin deixa o like nas respostas, já que eu fiz o resource inteiro pra vc kkkkkkkk
    1 point
  5. Desta forma: Client-side: local screenW, screenH = guiGetScreenSize() local painel = false -- Layout Fixo: (centralizado) local layout = { -- posX, posY, sizeX, sizeY, colorRGBA, text, textColorRGBA, fontSize, fontFamily, alignX, alignY {-320, -180, 640, 360, tocolor(75, 75, 75, 255)}, -- Window {-320, -190, 426, 20, tocolor(23, 209, 248, 255)}, -- Tittle Line {-300, -160, 600, 60, tocolor(20, 20, 20, 255), "Arsenal", tocolor(255, 255, 255, 255), 3, "bankgothic", "center", "center"}, -- Tittle {-300, -80, 186, 100, tocolor(43, 43, 43, 255), "M4", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 1 {-300, 40, 186, 100, tocolor(43, 43, 43, 255), "AK", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 2 {-93, -80, 186, 100, tocolor(43, 43, 43, 255), "GLOCK", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 3 {-93, 40, 186, 100, tocolor(43, 43, 43, 255), "Skin 1", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 4 {114, -80, 186, 100, tocolor(43, 43, 43, 255), "Skin 2", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 5 {114, 40, 186, 100, tocolor(43, 43, 43, 255), "VEICULO", tocolor(255, 255, 255, 255), 2, "pricedown", "center", "center"}, -- Button 6 {-320, 140, 640, 40, false, "Para fechar aperte 'Backspace'", tocolor(255, 255, 255, 255), 2, "default", "center", "center"}, -- Close info } function paineldx () for i, infos in ipairs (layout) do -- Para cada item da tabela layout, faça: local posX, posY, sizeX, sizeY, colorRGBA, text, textColorRGBA, fontSize, fontFamily, alignX, alignY = unpack (infos) -- Separa as infos em variáveis. -- Layout Fixo: posX = (screenW / 2) + posX -- Faz com que o centro da tela seja a posição 0, 0. Centralizando as posições. posY = (screenH / 2) + posY -- Converte as posições centralizadas da tabela para posições absolutas. if colorRGBA then -- Só faz dxDrawRectangle se tiver o parâmetro colorRGBA. Se não tiver, é só um texto isolado. if i >= 4 and i <= 9 then -- Se for um botão, então: (se for do item 4 até o 9) if isMouseInPosition (posX, posY, sizeX, sizeY) then -- Se o mouse está em cima do botão, então: colorRGBA = tocolor(0, 0, 0, 255) -- Torna a cor do botão preto. end end dxDrawRectangle(posX, posY, sizeX, sizeY, colorRGBA, false) end if text then -- Só faz dxDrawText se tiver o parâmetro texto. sizeX = posX + sizeX sizeY = posY + sizeY dxDrawText(text, posX, posY, sizeX, sizeY, textColorRGBA, fontSize, fontFamily, alignX, alignY) end end end addEvent("HitM", true) addEventHandler("HitM", root, function() -- Função chamada pelo servidor quando este jogador colide no marker do server. if not painel then addEventHandler("onClientRender", root, paineldx) painel = true showCursor(true) end end) bindKey("backSpace", "down", function() -- Tecla que fecha o painel. if painel then removeEventHandler("onClientRender", root, paineldx) painel = false showCursor(false) end end) addEventHandler("onClientClick", root, function(button, state) if button == "left" and state == "down" then if painel then for i, infos in pairs (layout) do -- Neste caso uso pairs pois a ordem dos itens não importa. local posX, posY, sizeX, sizeY = unpack (infos) -- Separa as infos em variáveis. -- Layout Fixo: posX = (screenW / 2) + posX -- Converte a posição centralizada da tabela para posição absoluta. posY = (screenH / 2) + posY if isMouseInPosition(posX, posY, sizeX, sizeY) then if i == 4 then -- Se for o botão de M4, então: triggerServerEvent("setarAlgo", localPlayer, "weapon", 31, 9999) -- giveWeapon (source, 31, 9999) -- Não funciona client-side. elseif i == 5 then -- Se for o botão de AK, então: triggerServerEvent("setarAlgo", localPlayer, "weapon", 30, 9999) elseif i == 6 then -- Se for o botão de Glock, então: triggerServerEvent("setarAlgo", localPlayer, "weapon", 24, 9999) elseif i == 7 then -- Se for o botão de Skin 1, então: triggerServerEvent("setarAlgo", localPlayer, "skin", 28) elseif i == 8 then -- Se for o botão de Skin 2, então: triggerServerEvent("setarAlgo", localPlayer, "skin", 29) elseif i == 9 then -- Se for o botão de Vehicle, então: triggerServerEvent("setarAlgo", localPlayer, "vehicle", 560) end end end end end end) function isMouseInPosition (x, y, width, height) -- Função útil. if not isCursorShowing() then return false end local sx, sy = guiGetScreenSize() local cx, cy = getCursorPosition() local cx, cy = (cx * sx), (cy * sy) return ((cx >= x and cx <= x + width) and (cy >= y and cy <= y + height)) end Server-side: local m1 = createMarker(2027.903, 1545.603, 10.819 -1, "cylinder", 1.5, 0,195,255, 100) local vehicles = {} addEventHandler("onMarkerHit", m1, function(hit) if getElementType(hit) == "player" then -- Se quem colidiu no marker for um jogador, então: if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (hit)), aclGetGroup ("Admin")) then -- Se o jogador está na ACL Admin, então: setTimer(triggerClientEvent, 250, 1, hit, "HitM", hit) else outputChatBox("Acesso negado.", hit, 255, 0, 0) end end end) addEvent("setarAlgo", true) addEventHandler("setarAlgo", root, function (tipo, id, ammo) -- Função chamada pelo client. Seta algo no jogador. if tipo == "weapon" then giveWeapon(client, id, ammo, true) elseif tipo == "skin" then setElementModel (client, id) elseif tipo == "vehicle" then local x, y, z = getElementPosition(client) if isElement (vehicles[client]) then -- Se já existe um veículo criado por este jogador, então: destroyElement(vehicles[client]) -- Destrói esse veículo antes de criar outro. end vehicles[client] = createVehicle(id, x, y, z + 1) -- Cria o veículo em cima do jogador. end end) function limpaVehicle() -- Destrói o veículo criado pelo jogador quando ele sair do servidor. if isElement (vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end addEventHandler("onPlayerQuit", root, limpaVehicle) addEventHandler("onPlayerDisconnect", root, limpaVehicle)
    1 point
  6. what i mostly want from vehicles.ide is to make vehs load with an 'mtruck'.
    1 point
  7. Server-side scripts are not downloaded by players, so setting the cache does not change anything. Setting the cache means that the script is not downloaded to the player's disk, but is still loaded into memory so that it can run. It can still be manipulated by the client, so you should never trust data from the client. More about it here https://wiki.multitheftauto.com/wiki/Script_security
    1 point
  8. If you don't want the files to be saved on the players disk, set the cache to false in meta.xml. <script src="client.lua" type="client" cache="false" />
    1 point
  9. Hello, you can encrypt your script so people cant read it. You can't avoid people downloading client side script since it runs on their pc. As far as i know its the only solution but i could be wrong
    1 point
  10. Thank you for answer, i have 24gb memory ram and have this problem, What do you think we should do to solve this problem? Because it is really annoying
    1 point
  11. 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
  12. Hello developers and all members of the MTA Community. im looking to buy a fresh, optimazed npc hlc traffic system for my roleplay community. If there is anyone who has a intrest or a resource that he could sell to me - let me know. Regards
    1 point
  13. I think crash has disappear i was playing through 2hours and no crash Thank you so much for your help.I thnik it is end, unless you want something else :v . @Dutchman101
    1 point
  14. It's a system issue, (if you're interested, take a look at https://pastebin.com/wk5D5rBT -D3D9.dll @ 0x0010EA8F, as you can see no MTA calls are involved in the crash) what I advise is to update your GPU driver, and repair a potentially corrupt D3D9.dll: - Open commandprompt (cmd) as Administrator and type: dism /online /cleanup-image /restorehealth After it finishes, reboot your PC and open commandprompt once again. This type, type: sfc /scannow and wait for it to complete. When that is done, proceed to updating your drivers. To assist you with that, do the following: Please download and run MTADiag (rightclick > Run as Administrator) and follow the instructions. Press 'y' when asked to allow making changes, and 'n' when otherwise asked to. Post any Pastebin URL MTADiag gives you in this topic. Also when you look at this, https://www.google.com/search?q=0x0010EA8F even while it's a rare problem, you can see the underlying system issue is also capable of crashing other games. Edit - Btw, alternative for the Pastebin link at the beginning, about the specifics of this crash issue so others on the web that are affected can find it in the future.. in below spoiler. .. As per the last post in this topic, it turned out to be Windows OS / system file / d3d9.dll (either in system32 or the affected software's installation folder) corruption or non-original file problem
    1 point
  15. You most likely crashed as a result of memory problems. This can happen when you are using a mid-tier PC to play on a server loaded with heavy mods, unoptimized scripts, or just as often a combination of both. DISCLAIMER: some players would argue that their PC is good enough and has plenty of RAM memory, like 6GB or more. So much that they don't expect to run out of memory. So here's the story - GTA SA is an old game from 2005, and you can run MTA with hardware from that era on most decent servers with ease. But servers that are not decent, but "bad" in the sense described earlier, are able to turn this old game into a more demanding one than modern titles. One that even hits limits of this 2005 game, which wasn't designed for what is being done. We mean that any usage on gta_sa.exe above 3.2GB, even if you have much more RAM memory available, will not be stable. SOLUTIONS: Find another server to play on Upgrade your PC's hardware (most important is the amount of RAM memory) and perform some OS mainentance, limit the amount of processes using up memory. If you're on a 32-bit OS, install a 64-bit version. For more information, please read https://forum.mtasa.com/topic/78081-32-bit-windows-crashing/ If being able to play on a certain server is really important to you, and you decide to upgrade, then please note that unless you get a gaming PC, depending on the severity things are "bad" on said server, it might only extend the duration you can play at once without crashing. If things are bad enough, you can crash within an hour from connecting while using the baddest gaming PC available. Example: a lot of russian total conversion servers. If you cannot upgrade your PC or improve your situation by one of the above steps, then unfortunately there's no option other than mind the (type of) servers you're playing on.
    0 points
×
×
  • Create New...