Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Muito obrigado, agora ficou perfeito!!!!!!
  3. Месяц назад все было нормально, теперь при попытке зайти на любой сервер, даже в редактор карт. выкидывает с причиной из заголовка. 1E7A905F15C4DDA79A6013D47C6A4B93 Установлена win10 и несколько утилит для мониторинга характеристик. Антивирус включен, ничего постороннего нет.
  4. Bom dia, meu amigo! A função getElementModel(source) pega o modelo do veículo que o jogador está tentando entrar. seat == 0 garante que só estamos verificando o motorista. A função cancelEvent() impede a entrada no veículo — bem melhor do que setVehicleLocked, que trava pra todo mundo. O sistema usa uma tabela com o ID do veículo ([596] = true) para facilitar a checagem rápida. Como agradecimento você pode conferir o Claire Anticheat no meu perfi, pode ser útil pro seu servidor -- Lista de modelos que devem ter a entrada do motorista restrita local restrictedVehicles = { [596] = true, -- viatura policial [597] = true, -- outro veículo [598] = true -- e outro se quiser } -- Nome do grupo ACL autorizado local allowedACL = "Policial" function onPlayerAttemptEnterVehicle(player, seat, jacked) -- Só bloquear se for o banco do motorista if seat ~= 0 then return end -- Verifica se o veículo atual está na lista de veículos restritos local model = getElementModel(source) if not restrictedVehicles[model] then return end -- Verifica a conta do jogador e se ele está na ACL permitida local acc = getPlayerAccount(player) if not acc or isGuestAccount(acc) then return end local accName = getAccountName(acc) if not isObjectInACLGroup("user." .. accName, aclGetGroup(allowedACL)) then cancelEvent() -- Impede que ele entre como motorista outputChatBox("Apenas membros da ACL '" .. allowedACL .. "' podem dirigir este veículo.", player, 255, 0, 0) end end addEventHandler("onVehicleStartEnter", root, onPlayerAttemptEnterVehicle)
  5. Boa noite, gostaria de ajuda para alterar um script, eu fiz um script para bloquear a entrada de pessoas sem a ACL específica no veículo, porém ele também bloqueia a entrada de pessoas comuns mesmo de passageiro, existe a possibilidade de apenas bloquear que a pessoa que não tem a ACL específica entre de motorista? ou seja, mesmo sem a ACL vai poder ir de passageiro, também, nesse script ele só está configurado para 1 veículo, gostaria de poder ter mais veículos bloqueados, sem a necessidade de duplicar o arquivo do script, fazer tudo por aqui, a seguir vou enviar o script atual: function enterVehicle(player, seat, jacked) local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if (getElementModel(source) == 596) and (not isObjectInACLGroup("user.".. accountName,aclGetGroup("Policial"))) then setVehicleLocked(source, true) outputChatBox("Apenas A PM Pode entrar neste veículo.", player) else setVehicleLocked(source, false) end end addEventHandler("onVehicleStartEnter",root,enterVehicle) aqui ele executa a função, porém bloqueia a entrada total de pessoas sem a ACL, gostaria que mesmo sem ACL a pessoa pudesse ir de passageiro. também, só é possível bloquear 1 veículo, gostaria de poder adicionar mais veículos, nesse mesmo script.
  6. Yesterday
  7. MTA:SA - Claire Anticheat Claire is a modular, lightweight anticheat system for MTA:SA, designed to improve the integrity and fairness of servers. Its core philosophy is simple: organize detections into clean, independent modules, make them easy to configure, and build an open platform that others can expand and improve. Claire runs silently in the background, acting as a guardian layer — constantly monitoring player behavior, network conditions, and client-side integrity without interfering with gameplay or degrading performance. Its design favors discretion and precision, targeting cheats without disrupting legitimate users. If you're looking for a solid, customizable way to secure your MTA:SA server, try out Claire. Why does it matter? Cheating has become a problem in MTA:SA, and there's a growing need for servers to expand their protection. Claire was created to address that — not as a closed or private solution, but as something open to everyone. By being fully open-source, Claire gives server owners an accessible and transparent tool to detect common exploits and improve their server environment. But more than that, it invites collaboration. The idea is that, together — through testing, feedback, improvements, and shared knowledge — we can create a more solid, trustworthy anticheat system that benefits the entire MTA community. Current features Claire currently includes over 20 independent detection modules, covering movement, combat, environment manipulation, network spoofing, and more. All detections are modular, configurable, and designed to operate silently in the background with minimal performance impact. False positives are rare thanks to tolerance-based logic, score systems, and heuristic analysis. Overall reliability across all modules is expected to be around 95%, all features are listed at our GitHub page. Contributing Claire is aimed to be an open-source project. Feel free to contribute with PRs, reports, or suggestions at our GitHub page. Download download from MTA Community: resource - updated 2025/04/20 download from GitHub: source-code - always up-to-date Please check our GitHub page before downloading it, I'm open for suggestions.
  8. I’m in the process of developing several custom maps that rely heavily on IMG archives, which I need to update frequently. To speed up my workflow, I’ve begun using this IMGEditor (https://github.com/user-grinch/IMGEditor), as it provides the fastest and most efficient editing capabilities I’ve encountered. Unfortunately, every time I launch the tool, it’s flagged by the anti‑cheat system, blocking any further progress for 2-15 minutes. (Seems to be random) Is there anything that can be done about this?
  9. Long time ago, in those distant days when the evil spirit of Off-road wheels had not yet attacked the community, and Wenom was not the one effortlessly claiming first place in every round. Back when a time of 2:08 on Wu Zi Mu was considered a great achievement, and mappers, like wizards, created maps with such intricate lines that it took your breath away. In those days, when the National Cup wasn’t signed up by sixteen teams from a single nation, but by sixteen different nations. Somewhere in the principality of LSR, a new idea ignited within us. We envisioned something fresh—a show destined to make history. For us, it was a thrilling new challenge. In August 2016, it all began. We called it The Battle Begins. Sixty-four actors, sixty-four stories, sixty-four fates, all woven together on a single stage. A tournament that was meant to mark the start of something greater. The winners? Their names may have faded from memory, but those who were there, who witnessed it firsthand, still remember those days. It was a time when, for many, everything was just beginning. Some took their first steps on stage, while others, weary yet wise, passed their knowledge to a new generation, leaving their mark on history. And no one knew where this path would lead. Years passed, the stage evolved, just as the world around us changed. But we couldn’t leave this story unfinished. In 2021, as if awakening from a long slumber, we returned with a new season—The Battle Continues. This wasn’t just a continuation; it was a revival. The atmosphere in the air, the performances that left the audience breathless—it all became another chapter in MTA Race history. The old guard reminisced with nostalgia about the first season, while the new generation absorbed every word, every emotion, trying to imagine how it all began. But history never stands still. The second season demanded a conclusion, a finale to put a definitive end to this saga. Actors, tired of simple roles, craved new challenges. The veterans whispered, "Remember how it was?" And the newcomers, holding their breath, listened to their tales, dreaming of becoming part of the legend themselves. And now, years later, we return to where it all began—to complete what was started so long ago. Ladies and gentlemen, welcome... The End of The Battle. We invite all who wish to take part in this battle, where everyone can test their skills, enjoy the races, and feel the spirit of competition. Description: Your team, consisting of two players, will compete against other racers in a 2x2x2x2 system. Thirty-two teams will be randomly divided into 8 groups of 4 teams each. Players earn points for each race. The top two teams with the highest points advance to the next round. Each round consists of 5 maps, while the final round has 8 maps. Tournament Features: Dynamic group generation. Teams advancing to the second round will face new opponents. You will not race against the team that advanced alongside you from your group—but you may meet them again in the semifinals or final. If two or more teams tie in points within a group, an additional tiebreaker round will be played. Rules for tiebreakers are explained below. Varied map styles: The tournament will feature races of different types—Vanilla, Racing with NOS, Off-road, Moto, Grand Prix. Information: Multiplayer: Multi Theft Auto 1.6.0 (MTA) Ghostmode: On Registration: Opens on April 12, 2025, closes on April 24, 2025 All maps will be unknown, meaning you cannot practice them in advance. Limit: 32 teams + reserve teams Schedule: Saturday, 26 April 2025 – (Round 1) 17:00 CEST (1 Group) 17:35 CEST (2 Group) 18:10 CEST (3 Group) 18:45 CEST (4 Group) 19:20 CEST (5 Group) 19:55 CEST (6 Group) 20:30 CEST (7 Group) 21:05 CEST (8 Group) Sunday, 27 April 2025 – (Quarterfinals, Semifinals, Final) 17:00 CEST (Quarterfinal 1) 17:35 CEST (Quarterfinal 2) 18:10 CEST (Quarterfinal 3) 18:45 CEST (Quarterfinal 4) 19:30 CEST (Semifinal 1) 20:15 CEST (Semifinal 2) 21:10 CEST (Final) Server: mtasa://46.174.50.45:22056 (LSR) Rules: Points system: 1st – 15 pts, 2nd – 13 pts, 3rd – 11 pts, 4th – 9 pts, 5th – 7 pts, 6th – 5 pts, 7th – 3 pts, 8th – 1 pts FPS limit: 100 Players cannot use the quick respawn button (Default "B"). Respawn time on all maps is 10 seconds. Unsportsmanlike behavior (profanity, insults, threats, flooding, inappropriate conduct) results in disqualification. Forbidden: Cheats, trainers, mods, or any programs granting an unfair advantage. Fake players are not allowed (leads to disqualification). If a player disconnects (Timeout) within the first 10 seconds of a race, the referee will pause the race until reconnection. Follow the schedule strictly! If your team fails to join on time, a reserve team will replace you. Tiebreaker Rules: An additional round is played if two or more teams are tied in points after all rounds. 2x2: Your team wins if one player finishes 1st and the other reaches the finish line. However, if one of your players finishes 1st but the other fails to finish, while opponents take 2nd and 3rd, your team loses. 2x2x2 / 2x2x2x2: Standard points system (as in Rule 1). Registration and all information - https://discord.gg/jXgbdgT2
  10. Hey there! I told you before in some other post that I used Grok for scripting. He nearly pulled off a very nice Racing map panel. However there is a slight problem - when you buy the map, money goes away (money is inside the script too I think when you win a race it gives you certain amount) and map doesn't play or its not set. If you guys have any idea how can it be fixed, lmk. By the way, to get this kinda script you need around 2 hours on Grok for him to properly understand MTA scripting Codes: server.lua local moneyFile = "money.xml" local nextMapQueue = nil -- Store the next map if race resource isn't running -- Load player's money from XML function loadPlayerMoney(player) local serial = getPlayerSerial(player) local xml = xmlLoadFile(moneyFile) or xmlCreateFile(moneyFile, "money") if not xml then outputDebugString("Failed to load or create money.xml", 1) return end local node = xmlFindChild(xml, serial, 0) or xmlCreateChild(xml, serial) local money = tonumber(xmlNodeGetValue(node)) or 0 setElementData(player, "money", money) xmlSaveFile(xml) xmlUnloadFile(xml) end -- Save player's money to XML function savePlayerMoney(player) local serial = getPlayerSerial(player) local money = getElementData(player, "money") or 0 local xml = xmlLoadFile(moneyFile) or xmlCreateFile(moneyFile, "money") if not xml then outputDebugString("Failed to load or create money.xml", 1) return end local node = xmlFindChild(xml, serial, 0) or xmlCreateChild(xml, serial) xmlNodeSetValue(node, tostring(money)) xmlSaveFile(xml) xmlUnloadFile(xml) end -- Handle player join addEventHandler("onPlayerJoin", root, function() loadPlayerMoney(source) end) -- Handle player quit addEventHandler("onPlayerQuit", root, function() savePlayerMoney(source) end) -- Fetch all race map resources function getMapList() local mapList = {} local resources = getResources() if not resources then outputDebugString("Failed to get resources - check ACL permissions for 'function.getResources'!", 1) return mapList end local includedCount = 0 local excludedCount = 0 for i, resource in ipairs(resources) do local resName = getResourceName(resource) -- Skip system resources, our own resource, and known gamemodes if resName ~= "race_map_panel" and not resName:find("^%[") and resName ~= "csrw" and resName ~= "race" and resName ~= "play" and resName ~= "assault" and resName ~= "destructionderby" and resName ~= "ctf" and resName ~= "as-cliff" and resName ~= "ctf-goldcove" then local metaPath = ":" .. resName .. "/meta.xml" local metaFile = xmlLoadFile(metaPath) if metaFile then -- Check if the resource is a gamemode local infoNode = xmlFindChild(metaFile, "info", 0) local isGamemode = false if infoNode then local resType = xmlNodeGetAttribute(infoNode, "type") if resType and resType:lower() == "gamemode" then isGamemode = true excludedCount = excludedCount + 1 end end if not isGamemode then local isRaceMap = false local hasMapFile = false local gamemodesValue = nil -- Check for <map> element with a .map file local mapNode = xmlFindChild(metaFile, "map", 0) if mapNode then local mapSrc = xmlNodeGetAttribute(mapNode, "src") if mapSrc and mapSrc:find("%.map$") then hasMapFile = true end end -- Check for #gamemodes setting local settingsNode = xmlFindChild(metaFile, "settings", 0) if settingsNode then local settingNodes = xmlNodeGetChildren(settingsNode) for j, setting in ipairs(settingNodes) do local settingName = xmlNodeGetAttribute(setting, "name") local settingValue = xmlNodeGetAttribute(setting, "value") if settingName == "#gamemodes" then gamemodesValue = settingValue -- Parse the gamemodes value (e.g., '[ "race" ]' or '[ "race", "assault" ]') local gamemodes = settingValue:gsub("%[", ""):gsub("%]", ""):gsub('"', ""):gsub(" ", "") local gamemodeList = split(gamemodes, ",") if #gamemodeList == 1 and gamemodeList[1]:lower() == "race" then isRaceMap = true end break end end end -- If no #gamemodes setting, assume it's a race map if the name suggests it if hasMapFile and not gamemodesValue then if resName:find("^%[race%]") or resName:find("race-") then isRaceMap = true end end -- Include or exclude the map if hasMapFile and isRaceMap then includedCount = includedCount + 1 local mapInfo = { resourceName = resName, -- Store the actual resource name name = resName, -- Default to resource name author = "Unknown", cost = math.random(300, 1000) -- Random cost } if infoNode then local author = xmlNodeGetAttribute(infoNode, "author") local name = xmlNodeGetAttribute(infoNode, "name") if author then mapInfo.author = author end if name then mapInfo.name = name end end table.insert(mapList, mapInfo) else excludedCount = excludedCount + 1 end end xmlUnloadFile(metaFile) else excludedCount = excludedCount + 1 end else excludedCount = excludedCount + 1 end end outputDebugString("INFO: Total race maps found: " .. #mapList .. " (Included: " .. includedCount .. ", Excluded: " .. excludedCount .. ")", 3) return mapList end -- Send map list and player money to client addEvent("requestMapList", true) addEventHandler("requestMapList", root, function() local mapList = getMapList() local player = source local money = getElementData(player, "money") or 0 triggerClientEvent(player, "receiveMapList", player, mapList) triggerClientEvent(player, "receivePlayerMoney", player, money) end) -- Send player money to client addEvent("requestPlayerMoney", true) addEventHandler("requestPlayerMoney", root, function() local player = source local money = getElementData(player, "money") or 0 triggerClientEvent(player, "receivePlayerMoney", player, money) end) -- Function to set the next map function setNextMapIfPossible(mapResource, mapDisplayName, player) local raceResource = getResourceFromName("race") outputDebugString("DEBUG: Attempting to set next map to " .. getResourceName(mapResource) .. " for player " .. getPlayerName(player), 3) if raceResource and getResourceState(raceResource) == "running" then outputDebugString("DEBUG: Race resource is running, calling queueNextMap", 3) local success, errorMsg = pcall(function() return exports.race:queueNextMap(mapResource) -- Updated to queueNextMap end) if success and errorMsg then outputDebugString("DEBUG: Successfully queued next map to " .. getResourceName(mapResource) .. " for player " .. getPlayerName(player), 3) outputChatBox(getPlayerName(player) .. " has queued the next map to '" .. mapDisplayName .. "'!", root, 255, 255, 0) nextMapQueue = nil -- Clear the queue since the map was set return true else outputDebugString("DEBUG: Failed to queue next map to " .. getResourceName(mapResource) .. " - queueNextMap failed: " .. (errorMsg or "unknown error"), 1) outputChatBox("Failed to queue the next map (queueNextMap failed). Please try again.", player, 255, 0, 0) return false end else outputDebugString("DEBUG: Race resource not running (state: " .. (raceResource and getResourceState(raceResource) or "not found") .. "). Queuing map " .. getResourceName(mapResource), 1) nextMapQueue = { resource = mapResource, displayName = mapDisplayName, player = player } outputChatBox("Race gamemode not running. Your map '" .. mapDisplayName .. "' will be set as the next map when the gamemode starts.", player, 255, 255, 0) return false end end -- Handle map purchase and set as next map addEvent("onPlayerBuyMap", true) addEventHandler("onPlayerBuyMap", root, function(mapResourceName, mapDisplayName, cost) local player = source local money = getElementData(player, "money") or 0 if money >= cost then setElementData(player, "money", money - cost) savePlayerMoney(player) -- Set the purchased map as the next map local mapResource = getResourceFromName(mapResourceName) if mapResource then setNextMapIfPossible(mapResource, mapDisplayName, player) else outputDebugString("DEBUG: Map resource " .. mapResourceName .. " not found for player " .. getPlayerName(player), 1) outputChatBox("Map resource not found. Please try again.", player, 255, 0, 0) end triggerClientEvent(player, "onMapPurchaseSuccess", player, mapDisplayName) outputChatBox("You now have $" .. (money - cost), player, 0, 255, 0) else triggerClientEvent(player, "onMapPurchaseFail", player) end end) -- Try to set the queued map when the race gamemode starts addEventHandler("onResourceStart", root, function(startedResource) local resourceName = getResourceName(startedResource) if resourceName == "race" and nextMapQueue then outputDebugString("DEBUG: Race resource started. Attempting to set queued map " .. getResourceName(nextMapQueue.resource), 3) setNextMapIfPossible(nextMapQueue.resource, nextMapQueue.displayName, nextMapQueue.player) end end) -- Try to set the queued map when the current map ends addEvent("onRaceEnd", true) addEventHandler("onRaceEnd", root, function(winner) outputDebugString("DEBUG: onRaceEnd triggered with winner " .. getPlayerName(winner), 3) local player = winner local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) -- Try to set the queued map if it exists if nextMapQueue then outputDebugString("DEBUG: Race ended. Attempting to set queued map " .. getResourceName(nextMapQueue.resource), 3) setNextMapIfPossible(nextMapQueue.resource, nextMapQueue.displayName, nextMapQueue.player) end end) -- Handle race win detected by client addEvent("onClientPlayerRaceWin", true) addEventHandler("onClientPlayerRaceWin", root, function() outputDebugString("DEBUG: onClientPlayerRaceWin triggered for " .. getPlayerName(source), 3) local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end) -- Hook into possible race gamemode events (for debugging) addEvent("onPlayerFinish", true) addEventHandler("onPlayerFinish", root, function(rank) outputDebugString("DEBUG: onPlayerFinish triggered for " .. getPlayerName(source) .. " with rank " .. rank, 3) if rank == 1 then local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end end) addEvent("onPlayerWin", true) addEventHandler("onPlayerWin", root, function() outputDebugString("DEBUG: onPlayerWin triggered for " .. getPlayerName(source), 3) local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end) addEvent("onPlayerRaceFinish", true) addEventHandler("onPlayerRaceFinish", root, function(rank) outputDebugString("DEBUG: onPlayerRaceFinish triggered for " .. getPlayerName(source) .. " with rank " .. rank, 3) if rank == 1 then local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end end) addEvent("onPlayerVictory", true) addEventHandler("onPlayerVictory", root, function() outputDebugString("DEBUG: onPlayerVictory triggered for " .. getPlayerName(source), 3) local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end) addEvent("onPlayerWinDD", true) addEventHandler("onPlayerWinDD", root, function() outputDebugString("DEBUG: onPlayerWinDD triggered for " .. getPlayerName(source), 3) local player = source local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end) -- Debug command to simulate a race win (admin only) addCommandHandler("winrace", function(player) if not hasObjectPermissionTo(player, "general.adminpanel") then outputChatBox("You do not have permission to use this command!", player, 255, 0, 0) return end outputDebugString("DEBUG: Simulating race win for " .. getPlayerName(player), 3) local money = getElementData(player, "money") or 0 local reward = 1000 setElementData(player, "money", money + reward) savePlayerMoney(player) outputChatBox("You won the race and earned $" .. reward .. "! Total: $" .. (money + reward), player, 0, 255, 0) triggerClientEvent(player, "receivePlayerMoney", player, money + reward) end) -- Debug command to check money addCommandHandler("money", function(player) local money = getElementData(player, "money") or 0 outputChatBox("Your money: $" .. money, player, 255, 255, 0) end) client.lua local screenW, screenH = guiGetScreenSize() local mapPanelVisible = false local selectedMap = nil local maps = {} local playerMoney = 0 -- Create the map panel GUI function createMapPanel() if mapPanelVisible then return end mapPanelWindow = guiCreateWindow((screenW - 400) / 2, (screenH - 300) / 2, 400, 300, "Map Panel", false) guiWindowSetSizable(mapPanelWindow, false) mapGrid = guiCreateGridList(10, 30, 380, 150, false, mapPanelWindow) guiGridListAddColumn(mapGrid, "Map Name", 0.5) guiGridListAddColumn(mapGrid, "Author", 0.3) guiGridListAddColumn(mapGrid, "Cost", 0.2) for i, map in ipairs(maps) do local row = guiGridListAddRow(mapGrid) guiGridListSetItemText(mapGrid, row, 1, map.name, false, false) guiGridListSetItemText(mapGrid, row, 2, map.author or "Unknown", false, false) guiGridListSetItemText(mapGrid, row, 3, tostring(map.cost), false, false) end moneyLabel = guiCreateLabel(10, 190, 380, 20, "Your Money: $" .. playerMoney, false, mapPanelWindow) infoLabel = guiCreateLabel(10, 210, 380, 20, "Select a map to see details.", false, mapPanelWindow) buyButton = guiCreateButton(10, 230, 180, 30, "Buy Map", false, mapPanelWindow) quitButton = guiCreateButton(200, 230, 180, 30, "Quit", false, mapPanelWindow) addEventHandler("onClientGUIClick", mapGrid, onMapSelect, false) addEventHandler("onClientGUIClick", buyButton, buyMap, false) addEventHandler("onClientGUIClick", quitButton, closeMapPanel, false) mapPanelVisible = true showCursor(true) -- Show the cursor when the panel opens if #maps == 0 then outputChatBox("No maps found on the server!", 255, 0, 0) end end -- Handle map selection function onMapSelect() local row = guiGridListGetSelectedItem(mapGrid) if row ~= -1 then selectedMap = maps[row + 1] guiSetText(infoLabel, "Name: " .. selectedMap.name .. " | Author: " .. (selectedMap.author or "Unknown") .. " | Cost: $" .. selectedMap.cost) end end -- Buy the selected map function buyMap() if not selectedMap then outputChatBox("Please select a map first!", 255, 0, 0) return end triggerServerEvent("onPlayerBuyMap", localPlayer, selectedMap.resourceName, selectedMap.name, selectedMap.cost) end -- Close the panel function closeMapPanel() if mapPanelWindow then destroyElement(mapPanelWindow) mapPanelVisible = false selectedMap = nil showCursor(false) -- Hide the cursor when the panel closes end end -- Toggle the map panel with F3 addEventHandler("onClientResourceStart", resourceRoot, function() bindKey("f3", "down", function() if mapPanelVisible then closeMapPanel() else triggerServerEvent("requestMapList", localPlayer) end end) setTimer(function() outputChatBox("Press F3 to open the Map Panel!", 255, 255, 0) end, 5000, 1) end) -- Receive map list from server addEvent("receiveMapList", true) addEventHandler("receiveMapList", root, function(mapList) maps = mapList outputChatBox("Received " .. #maps .. " maps from server.", 0, 255, 0) createMapPanel() end) -- Receive player money from server addEvent("receivePlayerMoney", true) addEventHandler("receivePlayerMoney", root, function(money) playerMoney = money if moneyLabel and isElement(moneyLabel) then guiSetText(moneyLabel, "Your Money: $" .. playerMoney) end end) -- Handle successful purchase response from server addEvent("onMapPurchaseSuccess", true) addEventHandler("onMapPurchaseSuccess", root, function(mapDisplayName) outputChatBox("Map '" .. mapDisplayName .. "' purchased successfully and set as the next map!", 0, 255, 0) triggerServerEvent("requestPlayerMoney", localPlayer) closeMapPanel() end) -- Handle insufficient funds addEvent("onMapPurchaseFail", true) addEventHandler("onMapPurchaseFail", root, function() outputChatBox("Not enough money to buy this map!", 255, 0, 0) end) -- Detect "You have won the race!" message addEventHandler("onClientChatMessage", root, function(message) if message == "You have won the race!" then triggerServerEvent("onClientPlayerRaceWin", localPlayer) end end) It also creates money.xml which stores money, and I tried AI to understand that I wanted to pick up the money from the users account (when you add it via admin panel for example) but I couldn't. I'm also wondering if you guys could make this script better anyhow? I recommend debugscript 3 too Thanks for any help.
  11. Welcome to our forums! I've moved your question to the scripting section so it gets more recognition, that's where it belongs.
  12. Nico834

    Anti-Cheat

    Welcome to our forums! Please follow the steps below: - Download and run the latest version of MTADiag on your computer. - Post the pastebin link generated by the tool here. * Requires administrator rights on Windows Vista and newer operating systems. * Requires the 2017 version of Visual C++ Redistributable. Side note: I moved your question to the client section instead of server
  13. Welcome to our forums! Please share your code with us so we can help fix any errors that may arise.
  14. Welcome to our forums! Your copy of GTA:SA is corrupted, obtain it from another source and reinstall it. Consider purchasing the game from an authorized source, like Rockstar Games Launcher or Steam.
  15. Welcome to our forums! Please follow the steps below: - Download and run the latest version of MTADiag on your computer. - Post the pastebin link generated by the tool here. * Requires administrator rights on Windows Vista and newer operating systems. * Requires the 2017 version of Visual C++ Redistributable.
  16. Welcome to our forums! Please follow the steps below: - Download and run the latest version of MTADiag on your computer. - Post the pastebin link generated by the tool here. * Requires administrator rights on Windows Vista and newer operating systems. * Requires the 2017 version of Visual C++ Redistributable.
  17. Welcome to our forums! Have you tried reinstalling MTA?
  18. Welcome to our forums! Please follow the steps below: - Download and run the latest version of MTADiag on your computer. - Post the pastebin link generated by the tool here. * Requires administrator rights on Windows Vista and newer operating systems. * Requires the 2017 version of Visual C++ Redistributable.
  19. Welcome to our forums! Were you able to resolve the issue by reinstalling or do you need further assistance?
  20. Welcome to our forums! We are unable to assist you with this problem because it's unique to SeeMTA's fork of MTA and the official client does not have it. Try contacting SeeMTA's support.
  21. I have CD48 (anti cheat) error, MTA Diag not option for me, can someone chechk my load.dll file? Or give me ide what should be the problem? https://imgur.com/a/yNgIZRC
  22. Welcome to our forums! Seems like you're having a server-specific issue. You can also ask server staff to see if there is anything that they can assist you with in this matter. If you can't find assistance there or your issue pops up on other servers as well, come back whenever and I will try to help you.
  23. Last week
  24. Is there way to have addon cars with custom id? Like not to replace original cars? Thanks
  25. Well you could load the Quadbike animation group (Load IFP) for the player, or use the function that let you set bone rotation Fort the player. What you cannot do is change a vehicle ID's animation group with code
  26. Szia, itt tudsz fellebezni: https://forum.multitheftauto.com/forum/195-discord-ban-appeals/
  1. Load more activity
×
×
  • Create New...