Checa este ejemplo:
Client Side:
--Crear una Ventana y ocultarla
PANEL = guiCreateWindow(0.27, 0.27, 0.47, 0.58, "", true)
guiSetVisible ( PANEL, false )
--Evento para abrir la ventana
function open_gui()
if guiGetVisible(PANEL) == false then
guiSetVisible(PANEL, true)
showCursor (true)
else
guiSetVisible(PANEL, false)
showCursor (false)
end
end
addEvent("showGUI", true)
addEventHandler("showGUI", getRootElement(), open_gui)
Server Side:
--Funcion para limitar la GUI mediante un grupo ACL
function abrir(thePlayer)
accountname = getAccountName(getPlayerAccount(thePlayer))
if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then
triggerClientEvent(thePlayer, "showGUI", getRootElement())
end
end
--Funcion para activar un bind a la GUI cuando se inicia este resource
function inicio()
for index, player in ipairs(getElementsByType("player")) do
bindKey(player, "F5", "down", abrir)
end
end
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), inicio)
--Funcion para activar un bind cuando un player entra al servidor
function entrar()
bindKey(source, "F5", "down", abrir)
end
addEventHandler("onPlayerJoin", getRootElement(), entrar)
--Function para desactivar el bind cuando el resource es detenido
function unbin(player)
for index, player in ipairs(getElementsByType("player")) do
unbindKey(player, "F5", "down", abrir)
end
end
addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), unbind)
Y para las resoluciones te recomiendo usar variables relativas y no absolutas.