Jump to content

Search the Community

Showing results for tags 'gui'.

  • 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
    • 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. In 1440x900 resolution, the dx elements they are in the right place, but in 1920x1080 the dx elements move up, and in 1366x768 the dx elements move down.. Why? how to fix this? the guigetscreensize is added with the correct coordinates..
  2. Hi! I don't know, how is it possible: I try it with HTML, the video is in .webm format, and I have a bad fps drop, with link I can't do it, I don't know HTML well. I try it with createBrowser too, but with this, I can't do it that the gui or dxdraw be in front of the video, the browser.
  3. function createPasswordWindow() windowChangepw = guiCreateWindow(0.3859,0.349,0.2130,0.1628,"Jelszó váltás",true) guiSetSize(windowChangepw, 165, 21) guiSetAlpha(windowChangepw,0.80000001192093) editOldpw = guiCreateEdit(110,29,180,21,"",false,windowChangepw) guiSetAlpha(editOldpw,1) guiEditSetMasked(editOldpw,true) labelOldpw = guiCreateLabel(10,29,90,21,"Régi:",false,windowChangepw) guiSetAlpha(labelOldpw,1) guiLabelSetColor(labelOldpw,255,255,255) guiLabelSetVerticalAlign(labelOldpw,"center") guiLabelSetHorizontalAlign(labelOldpw,"left",false) editNewpw = guiCreateEdit(110,60,180,21,"",false,windowChangepw) guiSetAlpha(editNewpw,1) guiEditSetMasked(editNewpw,true) guiEditSetMaxLength(editNewpw,50) labelNewpw = guiCreateLabel(10,60,90,21,"Új:",false,windowChangepw) guiSetAlpha(labelNewpw,1) guiLabelSetColor(labelNewpw,255,255,255) guiLabelSetVerticalAlign(labelNewpw,"center") guiLabelSetHorizontalAlign(labelNewpw,"left",false) buttonChangepw = guiCreateButton(10,91,280,23,"Változtatás",false,windowChangepw) guiSetAlpha(buttonChangepw,1) buttonClosepw = guiCreateButton(10,115,90,23,"Bezár",false,windowChangepw) guiSetVisible(windowChangepw, false) addEventHandler("onClientGUIClick", buttonChangepw, clientSubmitChangepw, false) addEventHandler("onClientGUIClick", buttonClosepw, false) end --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- function turbeszbezar() guiSetVisible(windowChangepw, false) showCursor(false) end addEventHandler("onClientGUIClick", buttonClosepw, false) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- What wrong? Why not working?
  4. Hola, quisiera saber: ¿como hago para poder exportar una GUI? Por ejemplo quiero abrir esa gui desde un botón del panel freeroam. Gracias
  5. Hello. Szóval az a problémám, hogy 2 GUI-t csináltam, és el kéne különítenem a kettőt, mert a 2. GUI gombjait, az első GUI gombjainak érzékeli. Külön fájlban vannak megírva, de nem tudok semmit csinálni a második GUI-n mert az első reagálja le.
  6. So, my problem is, that i made a GUI, and when it opens, it opens for all the players online and the setElementFrozen affects every player, etc. The GUI is attached to markers, so when you enter the marker, the GUI pops up. But it pops up for everyone. If you're not in the ACL group, you're not allowed to use the GUI, so it closes, when you press a button and outputs a message that you're not allowed to use it. I have the same problem with outputChatBox. The message appears for everyone. So my question is, that how could is make the GUI appear and affect only the actual user, and the outputChatBox appear only for the player i want? If you need the Scripts, just let me know and I'll instert it here. Thanks for the help.
  7. So i have a problem, with GUIs. I made two GUIs and i should separate them, because the first GUI affects the second GUI. On the first GUI, i have two buttons. GUIEditor.button[1] and GUIEditor.button[2] On the second GUI, i have buttons two, starting from GUIEditor.button[1]. So the problem is, that the second GUI's buttons, aren't working, because it calls the function of the first GUI's buttons. The two scripts are in two files. So how could i separate them, so they don't have any effect on each other?
  8. function mutePlayer(button) if button == "left" then if (source == playerTab.button[2]) then player = guiGridListGetSelectedItemText(GUIEditor.gridlist[1]) time = guiGetText(playerTab.combobox[1]) reason = guiGetText(playerTab.edit[1]) thePlayer = getPlayerFromName(player) if (time == "10 mins") then setElementData(thePlayer, "isPlayerMuted", true) setTimer(setElementData, 1000, 1, getPlayerFromName(player), false) outputChatBox("(Admin) " .. player .. " has been muted for 10 minutes by " .. getPlayerName(localPlayer) .. " for " .. reason) end guiSetVisible(playerTab.window[1], false) guiSetVisible(GUIEditor.window[1], true) end end end addEventHandler("onClientGUIClick", resourceRoot, mutePlayer) Debug Error says: Bad argument @ 'setElementData' [Expected string at argument 2, got boolean on this line: setTimer(setElementData, 1000, 1, getPlayerFromName(player), false)
  9. Hi, I'm having a slight problem with "guiCreateWindow", it just doesn't appear at all. Here's my client.lua: x, y = guiGetScreenSize () function createGUI () local guiWidth, guiHeight = 500, 300 local centerX, centerY = (x / 2) - (guiWidth / 2), (y / 2) - (guiHeight / 2) myWindow = guiCreateWindow(centerX, centerY, 500, 300, "Information", true) guiSetVisible(myWindow, true) end addEventHandler( "onClientResourceStart", getRootElement( ), createGUI) and here's my meta.xml <meta> <script src="server.lua" type="server" /> <script src="client.lua" type="client" /> </meta> I can't see a single reason for it not to work, checked in debug and no errors there. I think I'm not fully understanding how the different types of positioning work. Earlier on I used the "centerX, centerY" variables on a "dxDrawImage" element, to position it in the exact center of the screen, and it worked fine. The Wiki explains about the position arguments of the "dxDrawImage" function: posX: the absolute X coordinate of the top left corner of the image posY: the absolute Y coordinate of the top left corner of the image However the explanation for the arguments of positioning on the "guiCreateWindow" function are slightly different: x: A float of the 2D x position of the GUI window on a player's screen. This is affected by the relative argument. y: A float of the 2D y position of the GUI window on a player's screen. This is affected by the relative argument. Maybe that's where I'm going wrong. Thanks for reading, hope I've provided enough info.
  10. --[[ -- Resource Name: Information. -- Author: Om (RipeMangoes69) -- Date: 4/12/2016 -- File: client.lua ]]-- -- GUI GUIEditor = { window = {}, label = {}, memo = {} } function createInfoObjects() local markers = { {area = "Los Santos Airport", x = 1582.45, y = -2286.32, z = 12}, {area = "Las Vegas Airport", x = 1674.30859375, y = 1444.9501953125, z = 9.2} } for _, m in ipairs(markers) do local marker = createMarker(m.x, m.y, m.z, "cylinder", 1, 255, 255, 255, 100) GUIEditor.window[1] = guiCreateWindow(645, 250, 266, 378, "Information: " .. m.area, false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(5, 353, 190, 15, "* Click anywhere on GUI Window to close it.", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") GUIEditor.memo[1] = guiCreateMemo(9, 24, 247, 324, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end end addEventHandler("onClientResourceStart", getRootElement(), createInfoObjects) function openGUI( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then if isPedInVehicle(hitElement) then outputChatBox("You cannot access GUI from vehicle!", 255, 0, 0) guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end end addEventHandler("onClientMarkerHit", resourceRoot, openGUI) function closeGUI() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", resourceRoot, closeGUI) How am i suppose to "change" the GUI Title ? (area in the table). thanks.
  11. Hello guys. I'm writing a costume GUI system with dx functions but it is possible with a browser too. What do you guys think which way should i do? Which has better performance? My dx GUI is simple (recentagle shaped) but if i make it with browser i would make a more fancy GUI (I mean curved border, nice animations with HTML5 or maybe responsive with media queries) MTA can handle this on a slow PC too? And can someone link some docs or examples about this JavaScript <-> Lua communication? How i JS call a Lua func or Lua a JS func?
  12. Hi! I want to get the clicked gui label's text, what I clicked on. There is a loop, so I can't add the label an own ID, or I don't know how can I do it. So I create labels in a loop(with the online players's name), and then under the onClientClick eventhandler, I retrieve the clickedElement type, but I get false. Everywhere I clicked, I get just false slot = 0 for v, character in ipairs(getElementsByType("player")) do local characterName = getElementData(character, "CharName") local name = tostring(characterName) slot = slot + 1 guiCreateLabel(440,230 + slot * (30) ,700,50,name,false) end function MemberClick ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if (button == "left" and state == "up") then local tipe = getElementType( clickedElement ) outputChatBox(tostring(tipe)) end end addEventHandler ( "onClientClick", root, MembeClick)
  13. Buenas, quisiera que me ayudaran en algo: Creé un panel y quiero que se active mediante el contacto con un marker, aquí está el detalle.. Cuando activo el panel en el marker, el panel les aparece a todos los usuarios, quiero que le aparezca solamente al que toca el marker, no a todo el mundo, ¿Cómo haría para que sucediera eso?
  14. local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawRectangle(screenW * 0.7951, screenH * 0.1944, screenW * 0.1979, screenH * 0.1033, tocolor(0, 0, 0, 131), false) end ) function greetPlayer ( ) local joinedPlayerName = getPlayerName ( source ) dxDrawText("#00baff" .. joinedPlayerName .. "#FFffFFJött Kockulni!", 1151, 181, 1420, 202, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer )
  15. Hello, I am scripting a panel that will set people into diffrent dimensions. But i need the code for chaning the Dimension Only, Please Every Answer would be to help. function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1210.48621, 2358.32373, 8.01253 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The Arabian Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer) ------------------------- function teleportPlayer() if(source == GUIEditor.button[2]) then local teleportX, teleportY, teleportZ = 1923.0625, -1760.005859375, 13.546875 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The English Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer)
  16. Hello, I want to use dX functions for my User Interface. I'm starting with a login panel and I was wondering how I could emulate the edit field of the GUI functions. Should I still use a edit field in a dxRectangle? How can I do it? Cheers!
  17. Hi! How can I do this, that from the inventory I hover an item to a player, then show that player the image? local tipus = getElementType ( hoverElement ) if(tipus == "player") then if(mozgatTargyInfo[1] == 60) then local jelveny = guiCreateStaticImage(50, 50, 295, 388, "kepek/jelveny.png", false) guiSetEnable(jelveny, false) if(hoverElement == getRootElement()) then guiSetVisible(jelveny, true) else guiSetVisible(jelveny, false) end else ... end I try to do like this, but it's not working, the picture visible just for me, how try to show the image. Sorry for my English!
  18. Hey folks, could someone point me to some nice DxGui library? I have been searching forums and google for like an hour now and no luck. I mainly need it to create custom inventory system for DayZ, so GridList and Drag&Drop functionality is what i need mostly but i guess if library is good but it does not have that i could script it myself. Any suggestions are welcome, and by the way i have seen dxgui on wiki but it seems like its not finished and abandoned.
×
×
  • Create New...