Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. Yesterday
  4. https://pastebin.mtasa.com/5184457554 forgot the pastebin
  5. Witam, mam problem że podczas wejścia na jaki kolwiek serwer wywala mi problem network trouble, po czym wyświela się błąd CD09 (utracenie połączenia z sewerem). reinstall gta sa oraz mta sa nic nie dało. https://youtu.be/hG-3FJlVfVU
  6. Thanks, will share to my mates and we'll test it out.
  7. Hey, i made a simple radio script, it works alright but after some time its just stops. Its really random, sometime it works for 10 secounds and sometime it works for minutes. i tried different urls but it doesnt change, i downloaded other radio scripts to see if i made something wrong, but i dont see anything, i play the sound on client side.
  8. Matevsz

    Fuel system

    Hello, I created a fuel system, but after a while the game starts to lag. Is there something wrong with the code? Yes, I know I still need to add refueling, but I'm trying to figure out why it's lagging so much Fuel gauge needle angle (fuelNeedle): - 33 full - 128 low fuel - 150 empty Client local screenX, screenY = guiGetScreenSize() local scale = math.min(screenX/1680, screenY/1050) local function dxDrawRelativeImage(x, y, w, h, image, r, g, b, a, postGUI) return dxDrawImage(x * scale, y * scale, w * scale, h * scale, image, r, g, b, a, postGUI) end local fuelNeedle = "Fuel/DALTSHORT.png" local fuelImage = "Fuel/fuelimage.png" local lowFuelAngle = 128 local warningShown = false function fuelToAngle(fuel) -- fuel = 0.0 to 1.0 return 33 + (1 - fuel) * 117 end function angleToFuel(angle) return math.max(0, math.min(1, 1 - (angle - 33) / 117)) end function drawFuelGauge() local vehicle = getPedOccupiedVehicle(localPlayer) if not vehicle or getVehicleType(vehicle) ~= "Plane" then return end local fuel = getElementData(vehicle, "plane:fuel") or 0.18 local angle = fuelToAngle(fuel) dxDrawRelativeImage(899, 741, 249, 244, fuelImage) dxDrawRelativeImage(899 + 15, 741 + 25, 176, 195, fuelNeedle, angle) if angle >= lowFuelAngle and not warningShown then -- low fuel warning warningShown = true elseif angle < lowFuelAngle then warningShown = false end end addEventHandler("onClientRender", root, drawFuelGauge) addEventHandler("onClientKey", root, function(key, press) if key == "W" and press and currentVehicle and isPedInVehicle(localPlayer) then local fuel = getElementData(vehicle, "plane:fuel") or 0 if fuel <= 0 then cancelEvent() -- plane is gliding without speed end end end) Server local fuelUsePerSecond = 1 / 3600 function angleToFuel(angle) return math.max(0, math.min(1, 1 - (angle - 33) / 117)) end addEventHandler("onVehicleEnter", root, function(player, seat) if seat == 0 and getVehicleType(source) == "Plane" then local currentFuel = getElementData(source, "plane:fuel") if currentFuel == nil or currentFuel == 0 then local fuel = angleToFuel(128) setElementData(source, "plane:fuel", angleToFuel(128)) -- low fuel end end end) setTimer(function() for _, vehicle in ipairs(getElementsByType("vehicle")) do if getVehicleType(vehicle) == "Plane" and getVehicleEngineState(vehicle) then local driver = getVehicleOccupant(vehicle) if driver then local fuel = getElementData(vehicle, "plane:fuel") or 0.18 fuel = fuel - fuelUsePerSecond if fuel < 0 then fuel = 0 end setElementData(vehicle, "plane:fuel", fuel) end end end end, 1000, 0)
  9. Last week
  10. hi there. when i join any servers it crashes without any error code given. I tried reinstalling mta and gta to diffrent directories. I even tried updating .NET framework but it didn't work, even tried updating my drivers but still didn't work i hope somebody knows how to fix it. Thanks for help
  11. Pido una sincera disculpa a la compañía de Mta por haber intentado usar trampas e intentar cambiar mi serial con /Spoofer/ a ver si me pueden dar una oportunidad no volveré a hacerlo y espero que me perdonen aprendí mi leccion y todo eso era lo Qi quería expresar espero que la pasen bien y que tengan un bonito año MI SERIAL ES 962CD5F87593339C0A3F1C0DBAC69EA3
  12. mtasa-blue-master\Shared\data\MTA San Andreas\MTA найди файл sa.dat, если его переименовать в sa.zip он откроеться как архив в архиве есть файл gta.dat я думаю через него можна добавить свои .IMG, .IPL, .IDE имей ввиду MainFunctions.cpp проверяет хеш sa.dat перед запуском
  13. Sziasztok pár honapja bannoltam nem értem miert semmilyen csalas nincsen . I have been banned for over a year from MTA for the reason "trainer". I haven't cheated on mta and I am not sure what caused this ban. It could be another program I have for other games but I am unsure. I have reinstalled windows several times and cleared everything but still nothing changed.
  14. You're right, we have removed the link to ensure safety for our community members. Thanks for raising awareness about this. I'll tag OP in case he is still around and has a backup of this map to upload on another (more trusted) file hosting site. @Xwad
  15. the link is gone, changed to a gambling site, can I have the link back to download the normandy ww2 object? thanks
  16. Have you tried Bottles/Soda? This is currently the easiest and most promissing way to get MTA running on linux. https://wiki.multitheftauto.com/wiki/Client_on_Linux_using_Bottles/Soda_Manual
  17. good job, if you have a different problem please post it here or create a new topic and tag m
  18. Needed an extra showCursore(false) before the timer showCursor(true) if savedCursorX and savedCursorY then showCursor(false) -- here local screenX, screenY = guiGetScreenSize() setTimer(function() setCursorPosition(savedCursorX * screenX, savedCursorY * screenY) showCursor(true) end, 50, 1) end So now it looks good thank you guys
  19. There are two kinds of methods, one with setTimer and the other with the alternative onClientRender setTimer : The cursor always appears in the center for one frame after showCursor(true). function openPanel() showCursor(true) -- Save the last cursor position (values between 0 and 1) local x, y = getCursorPosition() -- Get the screen resolution local sx, sy = guiGetScreenSize() -- After 50ms, set the cursor back to its previous position setTimer(function() setCursorPosition(x * sx, y * sy) end, 50, 1) end onClientRender: Use a timer or onClientRender to set the position after showing the cursor. function panelAc() showCursor(true) local x, y = getCursorPosition() local sx, sy = guiGetScreenSize() local function imlecDuzelt() setCursorPosition(x * sx, y * sy) removeEventHandler("onClientRender", root, imlecDuzelt) end addEventHandler("onClientRender", root, imlecDuzelt) end your fixed code : local toggle = false local savedCursorX, savedCursorY local function togglePanel() toggle = not toggle if toggle then showCursor(true) if savedCursorX and savedCursorY then local screenX, screenY = guiGetScreenSize() -- Wait one frame before setting the cursor position setTimer(function() setCursorPosition(savedCursorX * screenX, savedCursorY * screenY) end, 50, 1) end else savedCursorX, savedCursorY = getCursorPosition() showCursor(false) end end bindKey("k", "down", togglePanel) I think you understand, if you have a different problem please post it here or create a new topic and tag me
  20. I've run out of suggestions unfortunately, if i have smth i will come back
  21. Is there any error on debug or F8? I dont understand why its not working
  22. Thank you, but same :~.. xd doesnt help
  1. Load more activity
×
×
  • Create New...