Jump to content

Search the Community

Showing results for tags 'help'.

  • 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
    • [Read-Only] 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. So i wanted to make my own drift paradise server so i can play with my brother without downloading huge files everytime and because i also love having stuff that i like on my pc for ever, so i searched up on the server browser and found the drift paradise server joined it, played on it for a while, then i wanted to play with my brother but i dont want to download both model files twice, so i went online and searched up for MTA:SA Drift Paradise and this link showed up https://github.com/nbredikhin/drift-paradise-mta so i said why not play it offline or with my brother via lan and then i started setting up the server and arised alot of problems that i definetly didnt use chatgpt/gemini to get past to and then a bigger problem arised, there were missing files, which was the mapping files and those went missing so as a gentle man i went to the repo, and i found a link to download the missing files, turns out it was on a yandex file storage thingy and that was the first issue that the link expired or the link broke which means files arent available anymore, so i want anybodys help to get me the server up and running or just give me the files that would mean the whole world to me thank you so much :)
  2. I try to start any mode but i get "Error loading map" the server load the maps but nothing works in the lobby somebody can help? https://imgur.com/a/A0PznNq[/img]
  3. Chabkuu

    CPU bottleneck

    My CPU is being utilized to around 70%-100% whilst the GPU is only being used for 5-30%, I'm not getting any FPS ingame usually (20-30) with frame limited disabled. GTA works fine, 60+ most of the times, I only have the silentpatch installed and even without it, it was the same. Lowering the settings has no effect on fps Build: Running MTA on a HP Zbook 15 G3 I7-6820HQ Nvidia Quadro M1000M 2GBs 16Gigs of Ram
  4. I created a server for the first version of MTA DayZ and I've been playing for about 3 days and I haven't found any sniper rifles. In this case, they're called CZ, but I've never seen them before. I tried changing the respawn folder, I tried replacing it, I tried creating another one. I tried reducing the respawn time, but I didn't get any results. All other weapons appear normally. The M4 takes a while to find, but it does appear. I've tried looking in other places, like Helicrash.
  5. Hello guys! I'm working on one job script which is pizza delivery. Everything is working fine, but i wanted to give random salary after every customer. "fizu" mean the payment so i made random 5$ to 150$, but for some reason after every customer only give 18$ and not random. Any idea why this could happen? This is my code: fizu = math.random(5,150) addEventHandler("onColShapeHit", getRootElement(), function (thePlayer, sameDimension) if isElement(source) then if getElementType(thePlayer) == "player" then if sameDimension then local currentJob = startedJobs[thePlayer] if currentJob then local colData = getElementData(source, "pizzaCol") if colData and colData[1] == thePlayer then local carryingPizza = getElementData(thePlayer, "carryingPizza") or {} if carryingPizza[1] then local orderId = colData[2] if carryingPizza[1] == currentJob.pizzas[orderId] then local remainingPizzas = 0 local pizzaBoyElement = getElementData(thePlayer, "usingPizzaBoy") if isElement(pizzaBoyElement) then local pizzaBoyInventory = getElementData(pizzaBoyElement, "pizzaBoyInventory") or {} for k in pairs(pizzaBoyInventory) do remainingPizzas = remainingPizzas + 1 end end destroyElement(source) if remainingPizzas <= 0 then startedJobs[thePlayer] = nil setElementData(pizzaBoyElement, "pizzaBoyInventory", false) else currentJob.delivered[orderId] = true end exports.cl_core:giveMoney(thePlayer, fizu, "pizzaDelivered") setElementData(thePlayer, "usingPizzaBoy", false) setPedAnimation(thePlayer, false) setElementFrozen(thePlayer, false) triggerClientEvent(thePlayer, "pizzaDeliveredSuccessfully", thePlayer, orderId, remainingPizzas) exports.cl_hud:showInfobox(thePlayer, "s", "Sikeresen leszállítottad a pizzát! ") else exports.cl_hud:showInfobox(thePlayer, "e", "Ez a megrendelő nem ilyen pizzát kért!") end end end end end end end end )
  6. Simplified MTA Beginner's Guide https://gist.github.com/Fernando-A-Rocha/f99294cf32d8a205830068d9668a9090 Created by me
  7. Hi. I am now writing a launcher with authorization, etc., there was a question about the launch of Mta, whether there are keys ( parameters ) launch MTA? Let's say nick change or automatic connection when launching the game? Thanks for the reply, sorry for my English, used translator? function doUser_bottom_lClickLeft(UXMouseEvent $e = null) { execute('D:\Games\mt\Multi Theft Auto.exe', false); } P.S -> Another question, where can I get the source code of mta? And what programs will be required for compilation?
  8. Help with problem please. Msb8036 error: Windows SDK version 8.1 could not be found. Install the correct version of the Windows SDK, or change the SDK version on the project property pages, or right-click the solution and select change solution target platform. Thanks a lot. 1>------ Build started: project: Client Launcher, Configuration: Debug Win32 ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v150\Microsoft.Cpp.Windows SDK.targets(46.5): error MSB8036: Windows SDK 8.1 could not be found. Install the correct version of the Windows SDK, or change the SDK version on the project property pages, or right-click the solution and select change solution target platform. 1>Build project "Client Launcher.vcxproj" completed with an error. ========== Build: successful: 0, with errors: 1, unchanged: 0, skipped: 0 ==========
  9. Before the multi-theft allowed the use of ReShade was blocked more recently, the Rehade and nothing else wants an ENB series for weak PCs like mine I hope you do
  10. Good morning everyone. I wanted to show you a bug. I am using Parallels, a program to virtualize Windows on my MacBook Pro M1PRO. I was able to download the MTA, download GTA too. But when, I go to open the mta, it shows the GTA start screen and then crashes. I already installed the mta again, I tried many things. I want help please. This is the bug: Version = 1.5.9-release-21024.0.000 Time = Mon Nov 8 13:42:37 2021 Module = C:\WINDOWS\SYSTEM32\D3D9.DLL Code = 0xC000001D Offset = 0x0004DAA0 EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000000 ESI=00000000 EDI=00000000 EBP=0577FA50 ESP=0577F38C EIP=718FDAA0 FLG=00000000 CS=3A643A64 DS=3A643A64 SS=3A643A64 ES=3A643A64 FS=3A643A64 GS=577F6B0
  11. srex1

    CL25. HELP

    Help please. I launching the MTA, and after a minute error CL25 pops up. https://pastebin.mtasa.com/4308928417
  12. Hi i want to make a local server with this gamemode someone can help me carsoccer
  13. 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.
  14. Hi, ı want to block changes in coreconfig.xml how ı can?
  15. Hey guys... I followed the Example of how to make a Login Panel on the Wiki... I literally did it word for word and when I loaded the server just got a black screen.... I downloaded to Login Systems in Community Files and used them and they both worked... So I edited the one I liked and used it in my Resource and once again got a black screen... My FILE STRUCTURE is: -client -gui.lua -assets -ViroxRP.png -server.lua -meta.xml My gui.lua is this: function ViroxLoginWindow() -- define the X and Y positions of the window local X = 0.375 local Y = 0.375 -- define the width and height of the window local Width = 0.25 local Height = 0.25 -- create the window and save its element value into the variable 'wdwLogin' -- click on the function's name to read its documentation ViroxLogin = guiCreateStaticImage(X,Y,W,H,"assets/ViroxRP.png", true) -- define new X and Y positions for the first label X = 0.0825 Y = 0.2 -- define new Width and Height values for the first label Width = 0.25 Height = 0.25 -- create the first label, note the final argument passed is 'wdwLogin' meaning the window -- we created above is the parent of this label (so all the position and size values are now relative to the position of that window) User = guiCreateLabel(X, Y, Width, Height, "Username", true, ViroxLogin) -- alter the Y value, so the second label is slightly below the first Y = 0.5 Pass = guiCreateLabel(X, Y, Width, Height, "Password", true, ViroxLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 UsernameEditBox = guiCreateEdit(X, Y, Width, Height, "", true, ViroxLogin) Y = 0.5 PasswordEditBox = guiCreateEdit(X, Y, Width, Height, "", true, ViroxLogin) -- set the maximum character length for the username and password fields to 50 guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, ViroxLogin) -- make the invisible guiSetVisible(ViroxLogin, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() ViroxLoginWindow() -- if the GUI was successfully created, then show the GUI to the player if (ViroxLogin ~= nil) then guiSetVisible(ViroxLogin, true) outputChatBox("Welcome to Virox Roleplay v.0.001, please log in.") else -- if the GUI hasn't been properly created, tell the player outputChatBox("An unexpected error has occurred and the login GUI has not been created.") end -- enable the player's cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) ) function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(UsernameEditBox) -- get the text entered in the 'password' field local password = guiGetText(PasswordEditBox) -- if the username and password both exist if username and username ~= "" and password and password ~= "" then -- trigger the server event 'submitLogin' and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(ViroxLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end And my meta.xml is: <meta> <info author="KryptonicJaze" type="gamemode" name="ViroxRP" description="RP Server in Developement" /> <script src="server.lua" type="server" /> <script src="client/gui.lua" type="client" /> <file src="assets/ViroxRP.png" /> </meta> Can someone help me and figure out what I am doing wrong?
  16. On Tactics servers, weapons automatically reload when changing weapons, and I wanted a script that would do this can anyone help me?
  17. Let's talk script security. It might be a taboo topic for some but it shouldn't, at all. In fact, the more people talk about this and unite to discuss and create robust, safe and well-coded scripts, the better the MTA resource development community will be. Rules: Main article: https://wiki.multitheftauto.com/wiki/Script_security The key points are there, but the code examples don't suffice, and the implementations will vary depending on the gamemode and resources. Pinned information: Coming soon Notes: - I'm not perfect and everyone makes mistakes. Please correct me when I'm wrong. - Eventually if this becomes a popular topic, I am willing to incorporate translations of certain explanations into other languages in this OP, as I know a majority of the MTA community doesn't master the English language and prefers to communicate and read in other languages.
  18. Estou sendo expulso de todo servidor que entro. Já tentei diversas vezes reinstalar o MTA e GTA San Andreas, mas nada adianta. I'm being kicked out of every server I'm joining. I've tried several times to reinstall MTA and GTA San Andreas, but nothing helps.
  19. I don't know if this is the right place to post this but I cant upload my resource to the community resources page. My zip file size is 2.34 MB and it clearly says " Maximum upload size is 20 MB", any idea why?
  20. Hello dear forum members, I am deeply interested in a persistent question regarding my shader for the effect of raindrops flowing down the sides of the car, as well as the effect of raindrops (spots) on the surface of the car (roof, bumper). I’ve been struggling with these issues for a long time and still can’t figure out how to solve my two problems. I hope someone can help me and explain to a beginner in HLSL how to properly implement the shader. The first problem is that I don’t understand how to make the raindrops flow down the different sides of the car. Essentially, I have a single texture applied to the car, and I can't figure out how to split it into multiple segments and adapt it to flow around the sides of the car. (I also need to account for the unique features of each car model so that the flow looks realistic on each vehicle.) The second problem is the effect of tiny raindrops on the roof, hood, and bumper of the car (the generation of small droplets that gradually appear and disappear). The issue is that I’m trying to apply both effects in one shader, but the problem is that either only one of them works under certain settings, or nothing works at all. I can't get both effects to work harmoniously together. I’ll also provide an example of the Lua script and the textures used for the shader. I really hope for your help. I've been spending too much time on this, and I can't seem to find a solution. float4x4 gWorld : WORLD; float4x4 gView : VIEW; float4x4 gProjection : PROJECTION; float gTime : TIME; // Rain parameters float gDropSpeed = 0.03; // Speed of droplet flow float2 noiseScale = float2(0.2, 0.8); // Noise texture scale float3 lightDirection = float3(1.0, 1.0, -1.0); // Light direction float gDropSpread = 0.3; // Droplet spread float gDropDepth = 0.3; // Droplet depth texture gTexture; // Main car texture texture texRain; // Raindrop texture texture texNormalRain; // Raindrop normals texture texNoise; // Noise texture // Variables for controlling the effect float gAlpha = 0.01; // Alpha channel for the car float rainAlpha = 1.8; // Alpha channel for raindrops sampler2D gTextureSampler = sampler_state { Texture = ( gTexture ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texRainSampler = sampler_state { Texture = ( texRain ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texNormalRainSampler = sampler_state { Texture = ( texNormalRain ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texNoiseSampler = sampler_state { Texture = ( texNoise ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; struct VertexShaderInput { float4 Position : POSITION; // Using standard POSITION semantics for the vertex shader float2 TextureCoordinate : TEXCOORD0; // Passing texture coordinates }; struct PixelShaderInput { float4 Position : POSITION; // Passing position as float4 for proper operation float3 WorldPos : TEXCOORD1; // Passing world coordinates for calculations float2 TextureCoordinate : TEXCOORD0; // Passing texture coordinates }; PixelShaderInput VertexShaderFunction(VertexShaderInput input) { PixelShaderInput output; // Position in world coordinates float4 worldPos = mul(input.Position, gWorld); // Storing position for further projection output.Position = mul(mul(input.Position, gWorld), gView); output.Position = mul(output.Position, gProjection); // Applying projection // Storing world coordinates (for droplet flow) output.WorldPos = worldPos.xyz; // Passing texture coordinates output.TextureCoordinate = input.TextureCoordinate; return output; } float4 PixelShaderFunction(PixelShaderInput output) : COLOR0 { float2 textureCoordinate = output.TextureCoordinate; // Main car texture float4 baseColor = tex2D(gTextureSampler, textureCoordinate); baseColor.rgb = max(baseColor.rgb, 0.1); // Brightening dark areas // Getting noise for random movement float noise = tex2D(texNoiseSampler, textureCoordinate * noiseScale).r; // World coordinates to determine droplet direction float3 worldPos = output.WorldPos; // Using world coordinates // Determining droplet direction based on normals and world position float3 normal = normalize(output.WorldPos); // Normal to the surface // Checking direction by normals to determine which side of the car we're on if (abs(normal.x) > abs(normal.y) && abs(normal.x) > abs(normal.z)) { // Side surfaces textureCoordinate.y += gDropSpeed * gTime; // Flowing down the sides } else if (normal.y > 0.5) { // Top surface (roof) textureCoordinate.y -= gDropSpeed * gTime; // Droplets flow down } else { // Other sides (front and back) textureCoordinate.x -= gDropSpeed * gTime; // Optionally add droplet flow forward/backward } // Reducing random offset for more precise flow float2 offset = gDropSpread * (noise * 4.0 - 0.5) * float2(1.0, 2.5); // Using float2 for offset textureCoordinate -= offset; // Applying deviation in both axes // Raindrop texture float4 rainColor = tex2D(texRainSampler, textureCoordinate); // Adjusting droplets to the car color rainColor.rgb = baseColor.rgb * 0.8 + float3(0.1, 0.1, 0.1); // Adding body tint to droplets rainColor.a = rainAlpha; // Alpha channel of droplets // Normals for droplets float4 tempRainNormal = tex2D(texNormalRainSampler, textureCoordinate); // Explicitly using float4 float3 rainNormal = normalize(tempRainNormal.rgb * 2.5 - 0.75); // Normalizing normals // Lighting on droplets float diffuse = saturate(dot(normalize(rainNormal), normalize(lightDirection))); // Correct lighting // Combining colors float4 finalColor = lerp(baseColor, rainColor, rainAlpha * diffuse); finalColor.a = lerp(gAlpha, rainAlpha, diffuse * 0.9); // Adding droplet depth finalColor.rgb += gDropDepth * 0.9; // Depth effect of droplets float3 v = float3(0.0, 0.0, 0.0); float Tr2 = gTime * 11000.0; float2 n = tex2D(texNoiseSampler, textureCoordinate * 0.5).rg; for (float r = 4.0; r > 0.0; r--) // Reducing the number of iterations { float2 x = 2100.0 * r * 0.015; float2 p = 6.28 * textureCoordinate * x + (n - 0.5) * 2.0; float4 d = tex2D(texNoiseSampler, round(textureCoordinate * x - 0.25) / x); float t = (sin(p.x) + sin(p.y)) * max(0.0, 1.0 - frac(Tr2 * (d.b + 0.1) + d.g) * 2.0); if (d.r < (2.0 - r) * 0.08 && t > 0.5) { v += normalize(float3(-cos(p.x), lerp(1.2, 2.0, t - 0.5), 0.0)); } } finalColor.rgb += v * rainAlpha; return finalColor; } technique Replace { pass P0 { DepthBias = -0.0001; AlphaBlendEnable = TRUE; SrcBlend = SRCALPHA; DestBlend = INVSRCALPHA; VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_3_0 PixelShaderFunction(); } } LUA CODE: local shader = dxCreateShader("fx/shader.fx", 2, 300, true, "vehicle"); local zapylyayushiesyaDetali = { "remap_body", }; local rainTexture = dxCreateTexture("assets/RainCar.png") local normalRainTexture = dxCreateTexture("assets/RainNormal.png") local noiseTexture = dxCreateTexture("assets/enbnoise.png") dxSetShaderValue(shader, "texRain", rainTexture) dxSetShaderValue(shader, "texNormalRain", normalRainTexture) dxSetShaderValue(shader, "texNoise", noiseTexture) -- Применение шейдера к машине local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then --engineApplyShaderToWorldTexture(shader, "vehiclegrunge256", vehicle) for _, name in ipairs(zapylyayushiesyaDetali) do engineRemoveShaderFromWorldTexture(shader, name, localPlayer.vehicle) engineApplyShaderToWorldTexture(shader, name, localPlayer.vehicle) end end renderTarget = dxCreateRenderTarget(512, 512, true) addEventHandler("onClientRender", root, function() iprint(shader) if shader then if renderTarget then dxSetRenderTarget(renderTarget, true) dxDrawImage(0, 0, 512, 512, shader) dxSetRenderTarget() dxDrawImage(50, 50, 256, 256, renderTarget) end end end)
  21. He creado una cuenta en un servidor hace algún tiempo y puse un correo que no existe (queria salir rápido del paso) eso se registró con mi serial y ahora a cada servidor que intento entrar y me creo una cuenta me dice que tengo que confirmar la cuenta con dicho serial . Sé que he cometido una gran estupidez pero no sabía que iba a escalar a tan gran problema necesito ayuda por favor si es posible borrar todo para yo comenzar de cero.
  22. 26.08.2024 меня заблокировали в МТА https://photos.google.com/photo/AF1QipODhzqME43MizxBNN5tqvdxR3bg0qvd0vfar_P- (ошибка которая появляется при входе на любой сервер МТА) пожалуйста помогите * Ваш серийный номер: 74430AC9354C3323A755FFA526169224
  23. local Rotation = {vehicle:getComponentRotation("door_lr_ok")} vehicle:setComponentRotation("minigun", unpack(Rotation)) getVehicleComponentRotation I can find out the position of door_lr_dummy, but can I find out the rotation of door_lr_ok?
  24. Hello, I am communicating with you through translit. Is there anything I can do to identify the status of Download Player? When it starts and when it finds ended.
×
×
  • Create New...