All Activity
- Today
-
merge ?
-
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
-
good job, if you have a different problem please post it here or create a new topic and tag m
-
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
-
باقي احد من زمن الطيبين موجود؟
-
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
-
I've run out of suggestions unfortunately, if i have smth i will come back
-
No any errors..
-
Is there any error on debug or F8? I dont understand why its not working
-
Thank you, but same :~.. xd doesnt help
-
Thanks, we'll lock this then.
-
Hey, at first thank you very much for your kind words and sorry for the late response. I also read some YouTube comments that many would love to play on the servers again and I still have the Servers of Neon Fun and Neon United laying around. Unfortunately I can't test them at all, because of the problems with Wine / Linux described in my post. I already spent hours and days to try to get it working, but it seems that it's not of priority to have compatibility with Linux anymore. So ye I will still try now and then to finally get my Client set up, but I can't promise anything. If anyone has a working solution to get MTA running on Linux, please tell me, I would be very glad to get that small part of MTA's history up and running again.
-
local toggle = false local savedCursorX, savedCursorY local function restoreCursorPos() if savedCursorX and savedCursorY then local screenX, screenY = guiGetScreenSize() setCursorPosition(savedCursorX * screenX, savedCursorY * screenY) end end local function togglePanel() toggle = not toggle if toggle then showCursor(true) for i = 1, 5 do setTimer(restoreCursorPos, i * 50, 1) end else savedCursorX, savedCursorY = getCursorPosition() showCursor(false) end end bindKey("k", "down", togglePanel) Can you just try this? ı added a timer for it.
-
As I mentioned, I already tried getCursorPosition and setCursorPosition, but it doesn't work — the cursor still starts from the center of the screen.. local function togglePanel() toggle = not toggle if toggle then if savedCursorX and savedCursorY then local screenX, screenY = guiGetScreenSize() setCursorPosition(savedCursorX * screenX, savedCursorY * screenY) end showCursor(true) else savedCursorX, savedCursorY = getCursorPosition() showCursor(false) end end bindKey("k", "down", togglePanel) Doesnt work this way
-
player was informed about the other.
-
anti-cheat cheaters canceling onClientPlayerDamage
CastiaL replied to MineX server's topic in Scripting
addEventHandler("onClientPlayerDamage", localPlayer, function() if wasEventCancelled() then --triggerServerEvent("cancelDetected", localPlayer) end end, false, -999) -- low priority -
cursorX, cursorY = getCursorPosition() -- showCursor(false) <-- Use Before Then ... -- showCursor(true) <-- Use After Then screenX, screenY = guiGetScreenSize() setCursorPosition(cursorX*screenX, cursorY*screenY)
-
Please see:
-
Hi, Which MTA password are you talking about?
-
ander123eo joined the community
- Yesterday
-
Hi, When I use showCursor(true) to open a panel, the cursor appears in the center of the screen for a short moment, then instantly jumps to where it was before I closed the panel. I tried saving the last position using getCursorPosition() and restoring it with setCursorPosition(), but it doesn't help. Any idea how to prevent the cursor jumping from the center?
-
Merbahalar, USB'nizi tehdit olarak algılıyor olabilir bu yüzden ilk başta internet sağlayıcınızla görüşüm bir an önce internetini bağlatmalısınız.
-
Merhabalar sanırım bir sunucuda şifrenizi unuttunuz ve buradan destek bekliyorsunuz, bunun yerine şifrenizi unuttuğunuz sunucudaki Developer ya da Admin arkadaşlarla iletişime geçerek şifrenizi yenilettirebilirsiniz.
-
Merhabalar sorununuz hala geçerlimidir? sorununuzla ilgili bir ekran görüntüsü ya da crash message gönderebilirmisiniz, bu sayede daha iyi yardımcı olabilirim.
-
Merhabalar sorununuz hala devam etmektemidir?