Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. But you didn't change the priority.... This is the second script with the background: local screenWidth,screenHeight = guiGetScreenSize() local owlsFont = dxCreateFont( "files/fonts/font.ttf", 24 ) local spriteFile = "files/images/img.png" function mainDrawing () local ping = getPlayerPing(getLocalPlayer()) local alivePlayers = getAlivePlayers() --Backgrounds dxDrawImageSection (screenWidth - 125, screenHeight - (screenHeight - 10), 128, 64, 1, 287, 128, 64, spriteFile) dxDrawImageSection (261, screenHeight - 37, 64, 32, 195, 37, 64, 32, spriteFile)--Cash bg -- HERE when i write to fasle i dont see image -- vyska,roztiahnutie,natiahnutie, hmmm,horedole, dxDrawImageSection (325, screenHeight - 37, 64, 32, 131, 37, 64, 32, spriteFile)--Points bg -- Text time dxDrawText (getServerTime()[2], screenWidth - 42, screenHeight - (screenHeight - 33), screenWidth - 12, screenHeight - (screenHeight - 67), tocolor (255,255,255,255), 1, "default-bold", "center", "center")--Time text end addEventHandler("onClientRender", getRootElement(), mainDrawing, "true", "high") -- dx draw function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" if alignX then if alignX == "center" then ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 elseif alignX == "right" then ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) end end if alignY then if alignY == "center" then ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 elseif alignY == "bottom" then ay = by - dxGetFontHeight(scale, font) end end local alpha = string.format("%08X", color):sub(1,2) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(getColorFromString("#"..col..alpha)) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) dxDrawText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font) end end I changed the priority to high, this way it should be triggered before the one with the text. Try it.
  2. Did you change the priorities? It has to work...
  3. So? Do the thing with the priorities. Oh, you're using onClientPreRender in the first script, that's always triggered before onClientRender (that's why it's pre ). Try changing it to onClientRender.
  4. Why don't you combine it? In your case use the priority argument of the event you use to draw it, onClientRender. Set the priority to low for the one with dxDrawText, this way it will be triggered after the one with the background.
  5. postGUI has nothing to do with this, because he's not using GUI... It's simple... just put the dxDrawText under the dxDrawImageSection.
  6. I don't think that you can detect that.
  7. You mean how long is the fire on? You can't...
  8. Use the engine functions, https://wiki.multitheftauto.com/wiki/Cl ... _functions There are examples of what you need.
  9. MIKI785

    GUI Bug.

    addEvent("onlogin", true) addEventHandler("onlogin", getRootElement(), function (user, pass) local account = getAccount(user, pass) if account then if (logIn (source, user, pass) == true) then outputChatBox("Bejelentkeztél" .. user .. "nevű felhasználóba!") triggerClientEvent(source, "hideWindow", getRootElement()) else outputChatBox("Bejelentkezési hiba történt... Kérlek próbáld meg később!") end else outputChatBox("Helytelen felhasználónév / jelszó!") end end ) Try this, i changed line 5
  10. The translations that were finished before the abuse, do we have to correct them?
  11. I think that they just didn't translate it yet, czech and slovak are very similar and I think that every slovak person understands czech, so you could maybe use the images from czech main menu, they are all translated.
  12. Stop copying and make one yourself, that way you will know what to do.
  13. And the "country" command still doesn't work? Im very confused now I never had any problem with getPlayerCountry
  14. function getIpCountry ( ip ) if not loadIPGroupsIsReady() then return false end outputChatBox(tostring(ip)) --Debug.... outputs ip's value local ip_group = tonumber ( gettok ( ip, 1, 46 ) ) local ip_code = tostring( gettok ( ip, 2, 46 ) * 65536 ) + ( gettok ( ip, 3, 46 ) * 256 ) + ( gettok ( ip, 4, 46 ) )
  15. What does that thing I sent you output? It can't output nothing, 'cause there's tostring.... Edit: By those errors you sent it looks like there's no IP, do debug before line 20 and check the "ip" value.
  16. That's quite strange... Try this: addCommandHandler("country", function (plr) local country = exports.admin:getPlayerCountry(plr) outputChatBox(tostring(country)) end) What does that output? PS: Don't double-post.
  17. Is it showing your country in Admin panel? Also, if you're testing it on your local server, then your IP is probably 127.0.0.1 which cannot be localized.
  18. Nice, already translating to Czech
  19. I don't understand you, what do you want? What is the problem? All I know is that you want bank system GUI and that there's some problem...
  20. This is not a bad idea, i hope you will finish it.
  21. You could have posted some screenshots.
  22. I don't think that it's because of the spam.. viewtopic.php?f=13&t=58136
×
×
  • Create New...