CheiN Posted August 7, 2012 Posted August 7, 2012 manes, me podrian dar un ejemplo de guiSetVisible y bindKey?(preferencialmente "L") Gracias
Plate Posted August 7, 2012 Posted August 7, 2012 client: function showPanel () guiSetVisible (Ventanachorete, true) showCursor (true) end addEvent( "showPanel", true ) addEventHandler ( "showPanel", getRootElement(), showPanel) server: addEventHandler("onPlayerJoin",root, function () bindKey(source,"l","down",show) end) addEventHandler("onResourceStart",resourceRoot, function () for index, player in ipairs(getElementsByType("player")) do bindKey(player,"l","down",show) end end) function show(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then triggerClientEvent(thePlayer,"showPanel",thePlayer) end end creo que eso sirve
Castillo Posted August 8, 2012 Posted August 8, 2012 El no pidio que sea server side, ni que verificara si esta en el ACL de "Console". @Mr.Domo: bindKey ( "L", "down", function ( ) guiSetVisible ( miVentana, not guiGetVisible ( miVentana ) ) -- Muestra la ventana o la oculta si ya estaba visible. showCursor ( guiGetVisible ( miVentana ) ) -- Muestra el cursor segun la ventana este visible o no. end )
Recommended Posts