Jump to content

[HELP] dxgui and gui


opnaiC

Recommended Posts

Hello,

I want to make a admin panel. The problem is I cant set the window to unvisible and visible but I cant do that with the edit boxes... also can anybody help me to bind the key ..

        window = exports.dxgui:dxCreateWindow(445, 240, 748, 299, "") 
        label1 = exports.dxgui:dxCreateLabel(17, 32, 150, 23, "Транспорт:", window) 
        label2 = exports.dxgui:dxCreateLabel(167, 32, 150, 23, "Оружие:", window) 
        label3 = exports.dxgui:dxCreateLabel(317, 32, 150, 23, "Скины:", window) 
        engine = exports.dxgui:dxCreateButton(17, 65, 113, 26, "Мотор On/Off", window) 
        m4 = exports.dxgui:dxCreateButton(167, 65, 113, 26, "M4", window) 
        giveskin = exports.dxgui:dxCreateButton(317, 101, 113, 26, "Дать Скин", window) 
        mp5 = exports.dxgui:dxCreateButton(167, 101, 113, 26, "MP5", window) 
        deagel = exports.dxgui:dxCreateButton(167, 137, 113, 26, "Desert Eagel", window) 
        katana = exports.dxgui:dxCreateButton(167, 173, 113, 26, "Katana", window) 
        spray = exports.dxgui:dxCreateButton(167, 209, 113, 26, "Баллончик", window) 
        fallschirm = exports.dxgui:dxCreateButton(167, 245, 113, 26, "Парашют", window) 
        fbirancher = exports.dxgui:dxCreateButton(17, 101, 113, 26, "FBI Rancher", window) 
        towtruck = exports.dxgui:dxCreateButton(17, 137, 113, 26, "Tow Truck", window) 
        lable4 = exports.dxgui:dxCreateLabel(467, 32, 150, 23, "Наказание:", window) 
        mute = exports.dxgui:dxCreateButton(467, 137, 113, 26, "Мут", window) 
        kick = exports.dxgui:dxCreateButton(467, 173, 113, 26, "Кик", window) 
        jail = exports.dxgui:dxCreateButton(467, 209, 113, 26, "Тюрма", window) 
        ban = exports.dxgui:dxCreateButton(467, 245, 113, 26, "Бан", window) 
        lable5 = exports.dxgui:dxCreateLabel(617, 32, 150, 23, "Телепорт:", window) 
        tptoplayer = exports.dxgui:dxCreateButton(617, 101, 113, 26, "К игроку", window) 
        tpplayer = exports.dxgui:dxCreateButton(617, 137, 113, 26, "Игрока к себе", window) 
        follow = exports.dxgui:dxCreateButton(617, 173, 113, 26, "Следить", window)       
        exports.dxgui:dxSetVisible(window, true) 
        exports.dxgui:dxWindowSetSizable(window, false) 
        exports.dxgui:dxWindowSetMovable(window, false) 
         
        skinid = guiCreateEdit(762, 305, 113, 26, "ID  1-299", false) 
        playerid1 = guiCreateEdit(912, 305, 113, 26, "ID Игрока", false) 
        timeselect = guiCreateEdit(912, 341, 113, 26, "Минуты", false) 
        playerid2 = guiCreateEdit(1062, 305, 113, 26, "ID Игрока", false) 
        guiWindowSetVisible(playerid1, false) 
        guiWindowSetVisible(timeselect, false) 
        guiWindowSetVisible(playerid2, false) 
        guiWindowSetVisible(skinid, false) 
         
         
        function turnOn () 
        if exports.dxgui:dxSetVisible(window,false) then 
        exports.dxgui:dxSetVisible(window,true) 
        guiWindowSetVisible(skinid,true) 
        guiWindowSetVisible(playerid1,true) 
        guiWindowSetVisible(playerid2,true) 
        guiWindowSetVisible(timeselect,true) 
        else 
        exports.dxgui:dxSetVisible(window,false) 
        guiWindowSetVisible(skinid,false) 
        guiWindowSetVisible(playerid1,false) 
        guiWindowSetVisible(playerid2,false) 
        guiWindowSetVisible(timeselect,false) 
        end 
        end 
  
         
         
        addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
        bindKey ("P", "down", turnOn) 
        end) 
  
  
  
  
  
  

Link to comment
  • 2 years later...
  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...