الكود الثاني :
GUIEditor = {
button = {},
window = {},
label = {}
}
addEventHandler ( "onClientResourceStart", resourceRoot,
function ( )
GUIEditor.window[1] = guiCreateWindow(230, 271, 255, 196, "testing / by oN20", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 1.00)
guiSetVisible ( GUIEditor.window[1], false )
Medic = guiCreateButton(0.04, 0.10, 0.35, 0.17, "Button", true, GUIEditor.window[1])
end
)
bindKey ( "F5", "down",
function ( )
guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( guiGetVisible ( GUIEditor.window[1] ) )
end
)
function close ( theButton )
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
guiSetEnabled ( theButton, false )
setTimer ( guiSetEnabled, 5000, 1, theButton, true )
end