Witam
M?j problem polega na tym i? mam w jednym skrypcie 2 GUI. W przypadku pierwszego wszystko dzia?a poprawnie, w przypadku drugiego po wystartowaniu zasobu GUI od razu pojawia si? na ekranie i tu jest w?a?nie problem.
Oto kawa?ki kodu odpowiedzialne za w??czanie/wy??czanie GUI:
Client 1:
[lua] GUIEditor = {
button = {},
window = {}
}
GUIEditor.window[1] = guiCreateWindow(x, y, w, h, "Podno?nik", false)
GUIEditor.button[1] = guiCreateButton(x3, y3, w3, h3, "Poziom 3", false, GUIEditor.window[1])
GUIEditor.button[2] = guiCreateButton(x2, y2, w2, h2, "Poziom 2", false, GUIEditor.window[1])
GUIEditor.button[3] = guiCreateButton(x1, y1, w1, h1, "Poziom 1", false, GUIEditor.window[1])
--GUI ON/OF
function pokazz ()
if ( guiGetVisible ( GUIEditor.window[1]) == true ) then
guiSetVisible ( GUIEditor.window[1], false )
end
end
addEventHandler("onClientResourceStart", resourceRoot,pokazz)
--GUI
addEvent("poka", true)
addEventHandler("poka", root, function(player)
guiSetVisible ( GUIEditor.window[1], true)
showCursor (true,false)
toggleControl( "fire", false)
end)
addEventHandler ( "onClientMarkerLeave", cm, function()
guiSetVisible ( GUIEditor.window[1], false)
showCursor (false,false)
toggleControl( "fire", true)
end)[/lua]
Client 2:
[lua] --GUI 2
GUIEditor = {
butto... |