CheiN Posted August 7, 2012 Share Posted August 7, 2012 manes, me podrian dar un ejemplo de guiSetVisible y bindKey?(preferencialmente "L") Gracias Link to comment
Plate Posted August 7, 2012 Share 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 Link to comment
Castillo Posted August 8, 2012 Share 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 ) Link to comment
Recommended Posts