Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/03/23 in all areas

  1. You can find Multi Theft Auto on video media platforms YouTube and Twitch! Subscribe to us on YouTube Follow us on Twitch
    1 point
  2. make sure the font file and its extension are otf or ttf and make sure the file is not in a folder
    1 point
  3. An error in our system by the looks of it. It's been raised internally.
    1 point
  4. I should have clarified that race maps are only the ones of DD maps. There are no other race maps that wouldn't be build on DD base It's racing but for DD.
    1 point
  5. Olá! Pelo que entendi, você precisa pegar o recurso do elemento? Eu escrevi uma função que retorna um recurso de um elemento, ou false se algo der errado. Bem, junto com ele um exemplo para verificar o desempenho. Server: local vehicle = createVehicle(555, 0, 0, 5) function getResourceFromElement(element) if isElement(element) then local type = getElementType(element) for i,res in ipairs(getResources()) do if getResourceState(res) == "running" then for i,v in ipairs(getElementsByType(type, getResourceDynamicElementRoot(res))) do if v == element then return res end end end end end return false end setTimer(function() local res = getResourceFromElement(vehicle) if res then outputChatBox("Resource name: "..getResourceName(res)) end end, 500, 1)
    1 point
  6. Hello! I tried to do something similar, but even without animation, the code came out hard to read. I'm sure it's not optimal, but at least it works. Sorry, but my knowledge is hardly enough to create an animation. But I can try if you still need it! Video: Code: local image = dxCreateTexture(":nfsmw/assets/icon.png") local selected = 1 local count = 5 local elementOffset = 10*scaleValue --padding between items in a menu list local w, h = 100*scaleValue, 100*scaleValue local offsetX, offsetY = 550*scaleValue, 50*scaleValue local x, y = getScreenStartPositionFromBox(w, h, offsetX, offsetY, "right", "bottom") function render() local selectedPos = x for i=1, count do local difference = i-selected --get the difference between the selected element and the rendered element local differenceCopy = difference if difference < 0 then differenceCopy = -difference end local height = h - (differenceCopy*20*scaleValue) --here we decrease the size as we move away from the selected element local width = w - (differenceCopy*20*scaleValue) local offset = 0 local step = 1 if difference < 0 then step = -step end if difference ~= 0 then for k=0, difference, step do --the loop calculates the offset using the width for each element. I didn't come up with a formula how to calculate it without a loop offset = offset + (20*scaleValue)*k end end if difference > 0 then offset = offset - 20*scaleValue*differenceCopy end --if the element is further than the selected one, then we decrease the offset by one point. without it, elements after the selected one have an offset one point less than required local xImage = selectedPos + (w*difference) - offset + 10*scaleValue*difference --the actual position of the x-axis of the element local yImage = y+(h-height)/2 --the actual y-axis position of the element local alpha = 255 - 100*(differenceCopy) --transparency decreases with distance from the selected element if alpha < 0 then alpha = 0 end dxDrawImage(xImage, yImage, width, height, image, _, _, tocolor(255,255,255,alpha)) --element rendering end end function startRender() addEventHandler("onClientRender", root, render) end startRender() function selectElementInMenu(key, keyState, turn) --element select function if turn == "right" then if selected >= count then selected = count return end selected = selected + 1 elseif turn == "left" then if selected <= 1 then selected = 1 return end selected = selected - 1 end end bindKey("o", "up", moveMenu, "right") bindKey("i", "up", moveMenu, "left")
    1 point
  7. Here are some possible solutions: Update or reinstall the Microsoft Visual C++ Redistributable Packages: The MTA installer requires certain versions of the Microsoft Visual C++ Redistributable Packages to run. Make sure you have the latest versions installed or try reinstalling them. You can download them from the Microsoft website. Check for Windows updates: It's possible that your system is missing a required update or that an update was interrupted. Check for updates and install any that are available. Run System File Checker (SFC) scan: SFC is a Windows tool that checks for and repairs corrupted or missing system files. Open the Command Prompt as an administrator and type "sfc /scannow" to start the scan. Run the installer as an administrator: Right-click on the MTA installer file and select "Run as administrator" to ensure that the installer has the necessary permissions to install the program. Run a virus scan: Malware or viruses can also cause dependency errors. Make sure you have an up-to-date antivirus program installed and run a full scan of your system.
    1 point
  8. This Is Official Topic Can Send Screenshot in this topic
    0 points
×
×
  • Create New...