Jump to content

Bind key problem


JoZeFSvK

Recommended Posts

Posted

hey i have question i add to script bind key and dont work :(

local Window = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true )--create a window which has "Information" in the title bar. 
  
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, Window ) 
  
local tabMap = guiCreateTab( "Map Information", tabPanel )  
  
local tabHelp = guiCreateTab( "Help", tabPanel ) 
  
  
  
guiCreateLabel(0.02,0.04,0.94,0.2,"This is information about the current map",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,tabHelp) 
  
function funkcia() 
   guiSetVisible (Window, true) 
end 
  
bindKey ( localPlayer, "F1", "down", funkcia ) 
  
  
  
  
  

Posted
local Window = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true )--create a window which has "Information" in the title bar. 
  
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, Window ) 
  
local tabMap = guiCreateTab( "Map Information", tabPanel ) 
  
local tabHelp = guiCreateTab( "Help", tabPanel ) 
  
  
  
guiCreateLabel(0.02,0.04,0.94,0.2,"This is information about the current map",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,tabHelp) 
  
function funkcia() 
   guiSetVisible (Window, true) 
end 
  
bindKey ("F1", "down", funkcia ) 

Try it now

Posted (edited)

If Client:

  
showCursor (true) --To show it 
showCursor (false) --To hide it 

If Server:

  
showCursor (source, true) --To show it 
showCursor (source, false) --To hide it 

Edited by Guest
Posted
Window = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true )--create a window which has "Information" in the title bar. 
guiSetVisible(Window, false) 
tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, Window ) 
  
tabMap = guiCreateTab( "Map Information", tabPanel ) 
  
tabHelp = guiCreateTab( "Help", tabPanel ) 
  
  
  
guiCreateLabel(0.02,0.04,0.94,0.2,"This is information about the current map",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,tabHelp) 
  
function funkcia() 
   guiSetVisible (Window, true) 
end 
  
bindKey ("F1", "down", funkcia ) 

Posted
local Window = guiCreateWindow(0, 0, 0.5, 0.4, "Information", true) 
guiSetVisible(Window, false) 
  
local tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, Window) 
local tabMap = guiCreateTab("Map Information", tabPanel) 
local tabHelp = guiCreateTab("Help", tabPanel) 
guiCreateLabel(0.02,0.04,0.94,0.2,"This is information about the current map",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,tabHelp) 
  
bindKey("F1", "down", 
function() 
     guiSetVisible(Window, not guiGetVisible(Window)) 
     showCursor(guiGetVisible(Window)) 
end) 

Posted

and when i wanna add background image ?

local Window = guiCreateWindow(0.2, 0.3, 0.7, 0.5, "Userpanel", false) 
  
local tabPanel = guiCreateStaticImage(0, 0, 1, 1, "bg.png", true, window) 
guiSetEnabled(guiBack, false) 
  
local tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, Window) 
local tab1 = guiCreateTab("Stats", tabPanel) 
local tab2 = guiCreateTab("Players", tabPanel)  

Posted
local Window = guiCreateWindow(0, 0, 0.5, 0.4, "Information", true) 
guiSetVisible(Window, false) 
  
local tabPanel = guiCreateTabPanel(0, 0.1, 1, 1, true, Window) 
local tabMap = guiCreateTab("Map Information", tabPanel) 
local tabHelp = guiCreateTab("Help", tabPanel) 
local image = guiCreateStaticImage(0, 0, 1, 1, "bg.png", true, Window) 
guiCreateLabel(0.02,0.04,0.94,0.2,"This is information about the current map",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,tabHelp) 
  
bindKey("F1", "down", 
function() 
     guiSetVisible(Window, not guiGetVisible(Window)) 
     showCursor(guiGetVisible(Window)) 
end) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...