Здравствуйте, почему 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"... Сама проблема: Я нажимаю на ОК, а гуи не пропадает! Я могу бегать стрелять и тд. Но на экране гуи с нажатой кнопкой ОК. Что делать?