Jump to content

В чём проблема? (с GUI)


Recommended Posts

Здравствуйте, почему GUI не пропадает?

--Магазин оружия 
markersshop = {LS, LS1, SF, LV, LV1} 
markersshop[1] = createMarker (0, 0, 0, "cylinder", 1.5, 230, 240, 0, 200) 
setElementInterior ( markersshop[1], 1, 296.0716, -37.9, 1000.1 ) 
function createGuiWeaponShop() 
        window = guiCreateWindow ( 0.2, 0.2, 0.6, 0.6, "Магазин оружия", true ) 
        okButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, window ) 
        addEventHandler("onClientGUIClick", okButton, buttonOK, false) 
    end 
function guiShopWeapon () 
    createGuiWeaponShop() 
    showCursor(true) 
     
end 
--Кнопки 
  
function buttonOK(button, state) 
    if button == "left" and state == "up" then 
    guiSetVisible(createGuiWeaponShop, false) 
    showCursor(false) 
    end 
end     
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), buttonOK ) 
--/Кнопки 
--/Магазин оружия 

Я так думаю что, что-то в функции "buttonOK"... Сама проблема: Я нажимаю на ОК, а гуи не пропадает! Я могу бегать стрелять и тд. Но на экране гуи с нажатой кнопкой ОК. Что делать?

Edited by Guest
Link to comment
guiSetVisible(window, false)

Ты код смотрел? Я это использовал. И пожалуйста прочитай первый пост. Там в конце написано что именно не так.

Link to comment

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...