Search the Community

Showing results for tags 'gui'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 61 results

  1. Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Warning: DGS Version Lower than 3.4 is no longer supported. Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Basic: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Browser Plugin: Media Browser Color Picker Mask Remote Image QRCode Blur Box Rounded Rectangle Nine Slice Scaling Object Preview Support Canvas Scroll Pane's 3D Effect (TDX)Lopsided's dxlib Compatibility. 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "dgscmd" ( For more help, please input "help" in the CMD ) 8. Memo/Edit rewritten. 9. Object Oriented Programming Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS resembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support 17. Simple GUI To DGS (G2D) Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote/getPlayerIP. If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
  2. After I finished the first version of my character customization system i just realized its such a piece of crap, so i started writing a new version with a whole new concept. The first version worked with CJ skin and i just attached some custom head models to it. Conversely the new version is running with shaders and the skin is a custom dff. Here is a video of the head customization. The clothing is in progress yet, it takes a lot of time because i have to make custom cloth models. Hope you like it. Please don't ask for the source code, this script will never be released. Sorry.
  3. 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!
  4. I've been working on a script that realistically manipulates the wheels. I've gotten to the point I can hide the original wheels, in hopes I can later attach a new set in the same place. I'm aware I might have to use attachElements, and several other functions. For the moment, I'd like to attach a single wheel. I've got this: -- All GUI elements. local vehicle = getPedOccupiedVehicle(localPlayer) local x1, y1, z1 = getVehicleComponentPosition(vehicle, "wheel_lf_dummy") local x2, y2, z2 = getVehicleComponentPosition(vehicle, "wheel_rf_dummy") local x3, y3, z3 = getVehicleComponentPosition(vehicle, "wheel_lb_dummy") local x4, y4, z4 = getVehicleComponentPosition(vehicle, "wheel_rb_dummy") local function replace1 () attachElements (1097, vehicle, x1, y2, z1, 0, 0, 0) end addEventHandler ("onClientGUIClick", set1, replace1, false) -- Function runs when button called 'set1' is clicked. -- Everything else. Here's my thought process: First, I get the player's vehicle. Then, I get the position of all four wheels in the player's vehicle, and represent them with x1, y1 and z1. With all wheels hidden by another function, I then attach the wheel model in the same place as the front left wheel. At the moment, I'm only aiming at the position; I'll handle the rotation later. DB 3 can't identify '1097', and thus asks for a valid element. Am I on the right path?
  5. I made this: -- All other functions and GUI creation. -- [...] -- Created button called "fbumper". local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) -- Everything else... It works. Then I wanted to have the button switch between true to false when clicked. Something like: local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) elseif getVehicleComponentVisible(theVeh7) == "false" then setVehicleComponentVisible(theVeh7, "bump_front_dummy", true) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) guiSetVisible (vehmod, false) It doesn't work correctly. It sets it invisible, but it doesn't return the state to visible. I also thought about using the setVehicleComponentVisible (not setVehicleComponentVisible) to make it a little bit more compact. I'm using a setEngineState script to help myself, but I don't know how to use it with these arguments. DB 3 throws nothing. What am I doing wrong?
  6. [SOLVED] This will certainly be a beginner's subject. The folder [gameplay], located in "Resources", is filled with .rar files. I want to edit 'help.xml', which is inside "freeroam.rar". I tried extracting everything into a new folder called "freeroam", but my server is not detecting said folder. I'm sure I'm ignoring a command somewhere that's failing to locate the folder (might be written to only locate "freeroam.rar"). What can I do to reach the file, modify it, and keep the freeroam files working?
  7. I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.
  8. Hello dudes, I make a circular menu like in gta 5. For this I use dxDrawImage, the menu is divided into 8 pictures. For effect, I hover to change the picture. But the hover area is big. When an empty place is induced. That changes the picture. How to fix it? (Sorry for my English)
  9. Hello, want to make a inventory system. What is better CEF or dxDraw? Say CEF slow performance, but faster development.
  10. Вечер добрый, столкнулся с тем, что иногда после нажатия кнопки закрытия не исчезает GUI. Мышка скрывается а интерфейс остается. Юзаю вот такой костыль: function atmGUI() atmGUIMain = guiCreateStaticImage(0, 0, screenx, screeny, "atm.png", false) exitGUIbtn = guiCreateStaticImage(screenx/1.1955, screeny/1.367, screenx/20.5, screeny/17, "button.png", false, atmGUIMain) showCursor(true) end addEvent("drawATMgui", true) addEventHandler("drawATMgui", localPlayer,atmGUI) addEventHandler("onClientGUIClick", getRootElement(), function() if(source == exitGUIbtn) then guiSetVisible(atmGUIMain, false) destroyElement(atmGUIMain) showCursor(false) end end ) В основном всё работает как надо, но иногда бывают траблы с закрытием. Подскажите пожалуйста как исправить этот косяк.
  11. Hello, I am trying to make a script that swaps the image on screen for a new one from a table I really am lost and dont have idea what to do next, local screenW, screenH = guiGetScreenSize() local randomize2 = math.random ( #Imagens ) local alpha = 255 local current_image = "" function ImageRender(image,alpha) if getElementData (getLocalPlayer( ),"logedin") == false or getElementData (getLocalPlayer( ),"logedin") == nil then current_image = guiCreateStaticImage(0, 0, screenWidth, screenHeight, tostring(Imagens[image]), false) guiMoveToBack( current_image ) guiSetAlpha(current_image, alpha ) end end addEventHandler("onClientResourceStart", resourceRoot,ImageRender) function RenderImageSwap() if getElementData (getLocalPlayer( ),"logedin") == false or getElementData (getLocalPlayer( ),"logedin") == nil then if (alpha > 0) then newAlpha = alpha < 25 if (newAlpha < 0) then ImageRender(randomize2,255) else ImageRender(current_image,newAlpha) end end end end setTimer( RenderImageSwap, 1000, 0) This is my code right know, which unfortunately, isnt working at all, does anyone know how to make a fade out an image (set alpha to alpha - 25.5 in a duration of 10 seconds for example) and if it reaches zero, it fades the next one in (set alpha of new image to alpha + 25.5 in a duration of 5 seconds for example) thanks I really tried my best but I dont know what functions to use, was thinking on getCurrentTick but I dont get how it works
  12. Hello, I dont know if someone has posted this here before, I searched and wasn´t able to find anyone having this problem, my problem is, I have a DayZ script, which I have been modifying, but since the start some of my players were not able to click on the GUI from the Inventory, nor the gang system, nor the login panel, this just happens with some players, for example, everything works on my computer, but with a virtual machine, I am not able to click on anything, here is a video of what I am talking about, I have no idea why this is caused, there is no related problems in my debugscript, actually, there is only 1 thing that is wrong in my server and been lazy to fix it, just a warning and I am missing an event client side which has nothing to do with this, since it affects various resources, the only way I´ve been able to fix this is by restarting the resource, that seems to fix the issue but I cant restart every time someone logs in: VIDEO: VIDEO (dont know the tags to embed video here) Any help is appreciated
  13. Is it possible to get all the guiStaticImages that have the specified color? I created a few guiStaticImages that are using a fully black png image. i was trying to do it this way, but it does not work.. for i, v in ipairs(getElementType("gui-staticimage")) do local color = guiGetProperty(v, "ImageColours") if color == "000000" then outputChatBox("lol") end end
  14. Hello. (sry for english and stupid question) I created window and input field on DGS win = DGS:dgsDxCreateWindow(0.18, 0.27, 0.22, 0.3," ",true,0xFF000000,25,nil,0xFFFFFFFF,nil,0xFFFFFFFF,5,true) -- window emailBoxReg = DGS:dgsCreateEdit( 0.1, 0.36, 0.8, 0.1, "INPUT FIELD", true, win, 0xFF000000, 0.5, 0.5, nil, 0xFFEBEBEB, false) -- input field DGS:dgsDxGUISetVisible( winReg, true) -- show DGS:dgsDxWindowSetMovable(winReg, false) DGS:dgsDxWindowSetSizable(winReg, false) guiSetInputEnabled(true) -- input showCursor(true) -- cursor why if i click on input field, later click on window - next clicks everywhere not work?
  15. Somehow i can make this possible? When a player connect, then he have to wait the end of download, then he can use the fr gui. I want make fr gui usable when player download the mods. Sorry for my bad english..
  16. Hi guys,im stuck here... I want when i press on GUIEditor.button[1] it sends that i typed in GUIEditor.edit[1] to selected player.. --client GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 528) / 2, (screenH - 183) / 2, 528, 183, "dm panel - gat", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 32, 186, 142, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[1], "players", 0.9) GUIEditor.button[1] = guiCreateButton(247, 107, 271, 60, "DM", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.edit[1] = guiCreateEdit(247, 32, 269, 65, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(216, 63, 31, 15, "close", false, GUIEditor.window[1]) for id, player in pairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName ( player ), false, false ) guiSetVisible(GUIEditor.window[1], false ) end end ) function show () if guiGetVisible(GUIEditor.window[1] ) then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) else guiSetVisible(GUIEditor.window[1], true ) showCursor (true) end end addCommandHandler("dm", show) function clickin () if source == GUIEditor.label[1] then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) elseif source == GUIEditor.button[1] then if guiGetText(GUIEditor.edit[1] ) == "" then return end --im stoped here, showCursor (false) guiSetVisible(GUIEditor.window[1], false ) end end addEventHandler("onClientGUIClick", root, clickin)
  17. I made an script that make staffs can open an panel by using /dm then choose a player and type a message then send it... But my problem is i don't know how to trigger this to put this code in server side outputChatBox(msg, selectedplayer, 255, 255, 255, true) I mean to send the message to selected player only... client variables: msg = guiGetText(editbox) selectedplayer = guiGridListGetSelectedItem(gridlist) Help pls
  18. Hey, I don't know whats wrong in this guy. any ideas? GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(563, 204, 519, 491, "Rules and Regulation", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(9, 29, 500, 418, "", false, GUIEditor.window[1]) button1 = guiCreateButton(18, 449, 491, 32, "I agree", false, GUIEditor.window[1]) end ) function closeButton() if button1 == source then outputChatBox("Hey") end end addEventHandler("onClientGUIClick",button1,closeButton,false)
  19. Buenas a todos, estoy armando una sección de Mi Cuenta en mi servidor, quiero que sea una ventanita con un tabpanel que tenga las siguientes pestañas: Inicio (donde muestra las estadisticas basicas, nombre, tipo de cuenta, nivel, etc) Configuración (donde mostrara botones para cambiar la clave, eliminar la cuenta, etc) Clan (donde mostraria datos exportados del gangystem) Por ahora no se me ocurre ninguna otra solapa, si alguno le ve alguna utilidad a una solapa podría recomendármela también El problema es el siguiente, estoy creando esto a través de la GUI del resource freeroam (ya que el botón de Mi Cuenta está en el freeroam también, entonces quería hacer todo junto). El código es el siguiente: wndCuenta = { 'wnd', text = 'LPMV2 - Mi Cuenta', x = 380, y = 190, width = 500, height = 800, controls = { {'tbp', id='tbp1', text='pruebaTabPanel', width=200 , height=200}, }, } Y el resultado el siguiente: Es extraño, pero digo... quizá le faltan las tab para que funcione, entonces la agrego y el codigo queda así: wndCuenta = { 'wnd', text = 'LPMV2 - Mi Cuenta', x = 380, y = 190, width = 500, height = 800, controls = { {'tbp', id='tbp1', text='pruebaTabPanel', width=200 , height=200}, {'tab', id='tab1', text='pruebaTab', width=200 , height=200}, }, } Pero el resultado es que cuando quiero abrir esta sección (Mi Cuenta) muestra los ultimos 2 errores en el debugscript (ignoren el de callesgroove) Alguien podría ayudarme? Desde ya, muchas gracias!
  20. Hi all, I'm putting together a section of My Account on my server, I want it to be a little window with a tabpanel that has the following tabs: Start (where it shows the basic statistics, name, type of account, level, etc) Configuration (where it will show buttons to change the password, delete the account, etc) Clan/Gang (where it would show data exported from the gangystem) For now I can not think of any other flap, if any one sees a utility to a flap I could also recommend it The problem is this, I am creating this through the freeroam resource GUI (since the My Account button is in the freeroam too, then I wanted to do everything together). The code is the following: wndCuenta = { 'wnd', text = 'LPMV2 - Mi Cuenta', x = 380, y = 190, width = 500, height = 800, controls = { {'tbp', id='tbp1', text='pruebaTabPanel', width=200 , height=200}, }, } The result: It's strange, but I say ... maybe the tab is missing for it to work, so I add it and the code looks like this: wndCuenta = { 'wnd', text = 'LPMV2 - Mi Cuenta', x = 380, y = 190, width = 500, height = 800, controls = { {'tbp', id='tbp1', text='pruebaTabPanel', width=200 , height=200}, {'tab', id='tab1', text='pruebaTab', width=200 , height=200}, }, } But the result is that when I want to open this section (My Account) it shows the last 2 errors in the debugscript (ignore 'callesgroove' resource) Somebody could help me? From already thank you very much!
  21. Hi, is there already a way to make the default gui editboxes transparent? It seems to always have a white background, which doesn't look so good if they are used within a dx environment. If not, then this might be a good way to make the default editboxes usable outside of an actual gui window. @ccw Bonsai
  22. Hi all, could you tell me how to make a dynamic installation of interface sizes depending on the size of the user's screen? Code: function guiCreateMainMenu() local sWidth,sHeight = guiGetScreenSize() local localPlayerName = getPlayerName(getLocalPlayer()) mainMenuSound() menu = guiCreateStaticImage( 0, 0, sWidth, sHeight, "img/screen_shadow.png", false ) userImg = guiCreateStaticImage( sWidth/2.8, 0, sWidth/1.5, sHeight/1.5, "img/user.png", false, menu ) menuBg = guiCreateStaticImage( sWidth/7, sHeight/8.07692, sWidth/1.4, sHeight/17, "img/bg.png", false, menu ) menuFg = guiCreateStaticImage( sWidth/7, sHeight/8.07692, sWidth/1.4, sHeight/17, "img/fg.png", false, menu ) usernameLabel = guiCreateLabel( sWidth/2434.78260, sHeight/14000, 1, 1, localPlayerName, true, userImg) --24 символа макс. userNameFont = guiCreateFont( "fonts/calibri.ttf", 16 ) guiSetFont ( usernameLabel, userNameFont ) menuMainLabel = guiCreateLabel( sWidth/8400, sHeight/11666.66666, 1, 1, "*Главное меню*", true, menu) mainMenuFont = guiCreateFont( "fonts/carbon.ttf", 32 ) guiSetFont ( menuMainLabel, mainMenuFont ) carrierBtn = guiCreateLabel( (0.12/1680)*sWidth, 0.341, 1, 1, "КАРЬЕРА", true, menuFg) carrierBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( carrierBtn, carrierBtnFont ) carrierButton = guiCreateStaticImage( 385, 154, 80, 13, "img/btn.png", false, menu ) statBtn = guiCreateLabel( 0.2, 0.341, 1, 1, "СТАТИСТИКА", true, menuFg) statBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( statBtn, statBtnFont ) statButton = guiCreateStaticImage( 481, 154, 111, 13, "img/btn.png", false, menu ) achBtn = guiCreateLabel( 0.313, 0.341, 1, 1, "ДОСТИЖЕНИЯ", true, menuFg) achBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( achBtn, achBtnFont ) achButton = guiCreateStaticImage( 615, 154, 121, 13, "img/btn.png", false, menu ) bestBtn = guiCreateLabel( 0.432, 0.341, 1, 1, "ТОП ЛУЧШИХ ИГРОКОВ", true, menuFg) bestBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( bestBtn, bestBtnFont ) bestButton = guiCreateStaticImage( 758, 154, 198, 13, "img/btn.png", false, menu ) settingsBtn = guiCreateLabel( 0.616, 0.341, 1, 1, "НАСТРОЙКИ", true, menuFg) settingsBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( settingsBtn, settingsBtnFont ) settingsButton = guiCreateStaticImage( 980, 154, 101, 13, "img/btn.png", false, menu ) newsBtn = guiCreateLabel( 0.720, 0.341, 1, 1, "НОВОСТИ", true, menuFg) newsBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( newsBtn, newsBtnFont ) newsButton = guiCreateStaticImage( 1106, 154, 78, 13, "img/btn.png", false, menu ) aboutBtn = guiCreateLabel( 0.810, 0.341, 1, 1, "О СЕРВЕРЕ", true, menuFg) aboutBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( aboutBtn, aboutBtnFont ) aboutButton = guiCreateStaticImage( 1213, 154, 87, 13, "img/btn.png", false, menu ) showCursor(true) showChat(false) setPlayerHudComponentVisible("all", false) end
  23. Доброго времени суток. Столкнулся с такой проблемой как динамическое изменение размеров интерфейса под разрешение экрана игрока. Я накидал GUI под своё разрешение экрана т.е. в таком виде: guiCreateLabel( 0.2, 0.341, 1, 1, "СТАТИСТИКА", true, menuFg) statBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( statBtn, statBtnFont ) Вообще это всё выглядит вот так: Скриншот Код клиента целиком: function guiCreateMainMenu() local sWidth,sHeight = guiGetScreenSize() local localPlayerName = getPlayerName(getLocalPlayer()) mainMenuSound() menu = guiCreateStaticImage( 0, 0, sWidth, sHeight, "img/screen_shadow.png", false ) userImg = guiCreateStaticImage( sWidth/2.8, 0, sWidth/1.5, sHeight/1.5, "img/user.png", false, menu ) menuBg = guiCreateStaticImage( sWidth/7, sHeight/8.07692, sWidth/1.4, sHeight/17, "img/bg.png", false, menu ) menuFg = guiCreateStaticImage( sWidth/7, sHeight/8.07692, sWidth/1.4, sHeight/17, "img/fg.png", false, menu ) usernameLabel = guiCreateLabel( sWidth/2434.78260, sHeight/14000, 1, 1, localPlayerName, true, userImg) --24 символа макс. userNameFont = guiCreateFont( "fonts/calibri.ttf", 16 ) guiSetFont ( usernameLabel, userNameFont ) menuMainLabel = guiCreateLabel( sWidth/8400, sHeight/11666.66666, 1, 1, "*Главное меню*", true, menu) mainMenuFont = guiCreateFont( "fonts/carbon.ttf", 32 ) guiSetFont ( menuMainLabel, mainMenuFont ) carrierBtn = guiCreateLabel( (0.12/1680)*sWidth, 0.341, 1, 1, "КАРЬЕРА", true, menuFg) carrierBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( carrierBtn, carrierBtnFont ) carrierButton = guiCreateStaticImage( 385, 154, 80, 13, "img/btn.png", false, menu ) statBtn = guiCreateLabel( 0.2, 0.341, 1, 1, "СТАТИСТИКА", true, menuFg) statBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( statBtn, statBtnFont ) statButton = guiCreateStaticImage( 481, 154, 111, 13, "img/btn.png", false, menu ) achBtn = guiCreateLabel( 0.313, 0.341, 1, 1, "ДОСТИЖЕНИЯ", true, menuFg) achBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( achBtn, achBtnFont ) achButton = guiCreateStaticImage( 615, 154, 121, 13, "img/btn.png", false, menu ) bestBtn = guiCreateLabel( 0.432, 0.341, 1, 1, "ТОП ЛУЧШИХ ИГРОКОВ", true, menuFg) bestBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( bestBtn, bestBtnFont ) bestButton = guiCreateStaticImage( 758, 154, 198, 13, "img/btn.png", false, menu ) settingsBtn = guiCreateLabel( 0.616, 0.341, 1, 1, "НАСТРОЙКИ", true, menuFg) settingsBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( settingsBtn, settingsBtnFont ) settingsButton = guiCreateStaticImage( 980, 154, 101, 13, "img/btn.png", false, menu ) newsBtn = guiCreateLabel( 0.720, 0.341, 1, 1, "НОВОСТИ", true, menuFg) newsBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( newsBtn, newsBtnFont ) newsButton = guiCreateStaticImage( 1106, 154, 78, 13, "img/btn.png", false, menu ) aboutBtn = guiCreateLabel( 0.810, 0.341, 1, 1, "О СЕРВЕРЕ", true, menuFg) aboutBtnFont = guiCreateFont( "fonts/calibri.ttf", 15 ) guiSetFont ( aboutBtn, aboutBtnFont ) aboutButton = guiCreateStaticImage( 1213, 154, 87, 13, "img/btn.png", false, menu ) showCursor(true) showChat(false) setPlayerHudComponentVisible("all", false) end P.S. В начале уже пытался поправить эту проблему, но получилось мягко говоря не очень. Подскажите пожалуйста как оптимизировать меню без танцев с подбором новых значений?
  24. I would apperciate it very much if you could give some advice on DGS.
  25. Hello in this script the gui window is not opening in my server. before it was opening but the object is not moving and i had updated some things and then the gui is not opening Please fix the problem SERVER: --Creating Of The Parts local hull1 = createObject(1680, 139.78, -1919.66, 17.07, 0, 0, 180) --Hull1 local sail1 = createObject(1683, 140.56, -1912.22, 20.16, 0, 0, 180) --Sails1 --Attachments Of The Parts attachElements(sail1, hull1, 0, 0, 0) function GUIness(source) local taccount = getPlayerAccount ( source ) if isAdminAccount(taccount) then triggerClientEvent(source, "makeGUI1", root) end end addCommandHandler("balloon", GUIness) --Command for opening GUI function goToballoon(source) local taccount = getPlayerAccount(source) if isAdminAccount(taccount) then local x,y,z = getElementPosition(hull1) setElementPosition(source, x, y + 5, z - 9) end end addCommandHandler("gotoballoon", goToballoon) --Command for warping to the balloon function setballoonHeightFunc(playerSource, commandName, height) if (height) then local taccount = getPlayerAccount(source) if isAdminAccount(taccount) then local x,y,z = getElementPosition(hull1) setElementPosition(hull1, x, y, tonumber(height)) end end end addCommandHandler("balloonheight", setballoonHeightFunc) function stopballoonFunc() stopObject(hull1) end addEvent("stopballoon", true) addEventHandler("stopballoon", root, stopballoonFunc) --balloon Ship Raise/Lower/Reset function balloonHeightFunc(theValue) local x,y,z = getElementPosition(hull1) if theValue == 17 then moveObject(hull1, 0, x, y, 17) else moveObject(hull1, 5000, x, y, z + theValue) end end addEvent("balloonHeight", true) addEventHandler("balloonHeight", root, balloonHeightFunc) --balloon Ship Warper function balloonWarper(x, y, z, rx, ry, rz) moveObject(hull1, 0, x, y, z, rx, ry, rz) end addEvent("moveToBut1", true) addEventHandler("moveToBut1", root, balloonWarper) --Directional Movement Controls function balloonMove(xD, yD, zD) local x,y,z = getElementPosition(hull1) moveObject(hull1, 20000000, x + xD, y + yD, z + zD) end addEvent("balloonMoveEvent", true) addEventHandler("balloonMoveEvent", root, balloonMove) --Rotational Movement Controls function balloonRotateFunc(rX, rY, rZ) local x,y,z = getElementPosition(hull1) moveObject(hull1, 5000, x, y, z, rX, rY, rZ) end addEvent("balloonRotate", true) addEventHandler("balloonRotate", root, balloonRotateFunc) --Stop Bind function BindM() if (not isKeyBound(source, "m")) then bindKey(source, "m", "down", createM) end end addEventHandler("onPlayerSpawn", getRootElement(), BindM) function createM(player, commandName) local account = getPlayerAccount(player) if isAdminAccount(account) then stopObject(hull1) end end addCommandHandler("m", createM) function isAdminAccount(account) local nick = "" local group = aclGetGroup("Admin") if (account and group) then nick = string.lower(getAccountName(account) or "") for _, object in ipairs(aclGroupListObjects(group) or {}) do if (gettok(object, 1, string.byte('.')) == "user") then if (nick == string.lower(gettok(object, 2, string.byte('.')))) then return true end end end end return false end CLIENT: local resX, resY = guiGetScreenSize() function createGUI(thePlayer) cWindow = guiCreateWindow((resX/2)-315,(resY/2)-100,629,200,"Balloon Controls",false) buttonSAC = guiCreateButton(0.3418,0.485,0.0668,0.195,"Stop",true,cWindow) NW = guiCreateButton(0.2655,0.255,0.0668,0.195,"NW",true,cWindow) N = guiCreateButton(0.3418,0.255,0.0668,0.195,"N",true,cWindow) NE = guiCreateButton(0.4213,0.26,0.0668,0.195,"NE",true,cWindow) W = guiCreateButton(0.2671,0.485,0.0668,0.195,"W",true,cWindow) E = guiCreateButton(0.4213,0.49,0.0668,0.195,"E",true,cWindow) SW = guiCreateButton(0.2671,0.73,0.0668,0.195,"SW",true,cWindow) S = guiCreateButton(0.3434,0.73,0.0668,0.195,"S",true,cWindow) SE = guiCreateButton(0.4213,0.725,0.0668,0.195,"SE",true,cWindow) NWr = guiCreateButton(0.5119,0.26,0.0668,0.195,"45",true,cWindow) GoUp = guiCreateButton(0.5919,0.26,0.0668,0.195,"Up",true,cWindow) resetH = guiCreateButton(0.6750,0.12,0.0600,0.1,"Reset",true,cWindow) NEr = guiCreateButton(0.6693,0.26,0.0668,0.195,"45",true,cWindow) Wr = guiCreateButton(0.5119,0.49,0.0668,0.195,"90",true,cWindow) GoDn = guiCreateButton(0.5919,0.49,0.0668,0.195,"Down",true,cWindow) Er = guiCreateButton(0.6693,0.495,0.0668,0.195,"90",true,cWindow) button1 = guiCreateButton(0.7663,0.26,0.213,0.150,"Move To LS",true,cWindow) button2 = guiCreateButton(0.7663,0.440,0.213,0.150,"Move To SF",true,cWindow) button3 = guiCreateButton(0.7663,0.620,0.213,0.150,"Move To LV",true,cWindow) button4 = guiCreateButton(0.5175,0.725,0.213,0.195,"Close",true,cWindow) TiltUp = guiCreateButton(0.0143,0.49,0.1113,0.195,"Tilt Up",true,cWindow) TiltDown = guiCreateButton(0.0143,0.72,0.1113,0.195,"Tilt Down",true,cWindow) TiltRight = guiCreateButton(0.1430,0.49,0.1113,0.195,"Tilt Right",true,cWindow) TiltLeft = guiCreateButton(0.1430,0.72,0.1113,0.195,"Tilt Left",true,cWindow) GUIEditor_Label1 = guiCreateLabel(0.2766,0.125,0.2051,0.075, "Movement Controls",true,cWindow) guiLabelSetColor(GUIEditor_Label1,255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label1,"top") guiLabelSetHorizontalAlign(GUIEditor_Label1,"left",false) GUIEditor_Label2 = guiCreateLabel(0.5158,0.125,0.1781,0.08,"Rotation Controls",true,cWindow) guiLabelSetColor(GUIEditor_Label2,255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label2,"top") guiLabelSetHorizontalAlign(GUIEditor_Label2,"left",false) GUIEditor_Label3 = guiCreateLabel(0.806,0.125,0.1669,0.0739,"Warp Controls",true,cWindow) guiLabelSetColor(GUIEditor_Label3,255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label3,"top") guiLabelSetHorizontalAlign(GUIEditor_Label3,"left",false) GUIEditor_Label4 = guiCreateLabel(0.0525,0.135,0.1669,0.0739,"Tilt Controls",true,cWindow) guiLabelSetColor(GUIEditor_Label4,255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label4,"top") guiLabelSetHorizontalAlign(GUIEditor_Label4,"left",false) addEventHandler("onClientGUIClick", GoUp, function() triggerServerEvent("balloonHeight", root, 3) end, false) addEventHandler("onClientGUIClick", GoDn, function() triggerServerEvent("balloonHeight", root, -3) end, false) addEventHandler("onClientGUIClick", resetH, function() triggerServerEvent("balloonHeight", root, 17) end, false) addEventHandler("onClientGUIClick", buttonSAC, function() triggerServerEvent("stopballoon", root) end, false) addEventHandler("onClientGUIClick", button1, function() triggerServerEvent("moveToBut1", root, 139.78, -1919.66, 17.07, 0, 0, 0) end, false) addEventHandler("onClientGUIClick", button2, function() triggerServerEvent("moveToBut1", root, -1716.25, 1457.45, 17.07, 0, 0, 0) end, false) addEventHandler("onClientGUIClick", button3, function() triggerServerEvent("moveToBut1", root, 2289.28, 516.86, 17.07, 0, 0, 90) end, false) addEventHandler("onClientGUIClick", button4, closeCgui, false) addEventHandler("onClientGUIClick", NW, function() triggerServerEvent("balloonMoveEvent", root, -9999, 9999, 0) end, false) addEventHandler("onClientGUIClick", N, function() triggerServerEvent("balloonMoveEvent", root, 0, 9999, 0) end, false) addEventHandler("onClientGUIClick", NE, function() triggerServerEvent("balloonMoveEvent", root, 9999, 9999, 0) end, false) addEventHandler("onClientGUIClick", E, function() triggerServerEvent("balloonMoveEvent", root, 9999, 0, 0) end, false) addEventHandler("onClientGUIClick", SE, function() triggerServerEvent("balloonMoveEvent", root, 9999, -9999, 0) end, false) addEventHandler("onClientGUIClick", S, function() triggerServerEvent("balloonMoveEvent", root, 0, -9999, 0) end, false) addEventHandler("onClientGUIClick", SW, function() triggerServerEvent("balloonMoveEvent", root, -9999, -9999, 0) end, false) addEventHandler("onClientGUIClick", W, function() triggerServerEvent("balloonMoveEvent", root, -9999, 0, 0) end, false) addEventHandler("onClientGUIClick", NWr, function() triggerServerEvent("balloonRotate", root, 0, 0, 45) end, false) addEventHandler("onClientGUIClick", NEr, function() triggerServerEvent("balloonRotate", root, 0, 0, -45) end, false) addEventHandler("onClientGUIClick", Er, function() triggerServerEvent("balloonRotate", root, 0, 0, -90) end, false) addEventHandler("onClientGUIClick", Wr, function() triggerServerEvent("balloonRotate", root, 0, 0, 90) end, false) addEventHandler("onClientGUIClick", TiltUp, function() triggerServerEvent("balloonRotate", root, 3, 0, 0) end, false) addEventHandler("onClientGUIClick", TiltDown, function() triggerServerEvent("balloonRotate", root, -3, 0, 0) end, false) addEventHandler("onClientGUIClick", TiltRight, function() triggerServerEvent("balloonRotate", root, 0, 3, 0) end, false) addEventHandler("onClientGUIClick", TiltLeft, function() triggerServerEvent("balloonRotate", root, 0, -3, 0) end, false) guiSetVisible (cWindow, false) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createGUI) function openGUI(thePlayer) if (cWindow ~= nil) then guiSetVisible(cWindow, true) showCursor(true) end end