He estado trabajando con commandhandler para hacer diferentes scripts hasta ahora, pero en este momento quiero hacer gui's y tengo un problema.
addEventHandler("onClientKey",root, function (button, press)
if button == "F2" and press then
addEventHandler("guiSetVisible", root,function ()
screenW, screenH = guiGetScreenSize()
ventanaGangs = guiCreateWindow((screenW - 233) / 2, (screenH - 383) / 2, 233, 383, "Panel Gangs", false)
guiWindowSetSizable(ventanaGangs, false)
guiSetAlpha(ventanaGangs, 0.87)
botonInvitar = guiCreateButton(15, 31, 80, 26, "Invitar", false, ventanaGangs)
GUIEditor.button[1] = guiCreateButton(143, 31, 80, 26, "", false, ventanaGangs)
GUIEditor.button[2] = guiCreateButton(15, 82, 80, 26, "", false, ventanaGangs)
GUIEditor.button[3] = guiCreateButton(143, 82, 80, 26, "", false, ventanaGangs)
end
)
end
end
)
Quiero que cuando el jugador presione f2 se abra el panel, pero no lo consigo.