Jump to content

JR10 ! Need Help !


E-mail

Recommended Posts

Hi

i have made TapPanel But i need to add bind key F3 to open and close Please Help any one!

local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true ) 
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) 
local tabMap = guiCreateTab( "information", tabPanel ) 
local tabHelp = guiCreateTab( "Need Help?", tabPanel ) 
guiCreateLabel(0.02,0.04,0.94,0.2,"This server By|x[Dev-PoinT]x",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"Email:[email protected]",true,tabHelp) 

Link to comment

Try this:

  
--Server side 
addEventHandler("onPlayerJoin",getResourceRootElement(getThisResource()),function() bindKey (source, "f3", "down", tapP) end) 
addEventHandler("onResourceStart",getRootElement(), function() for index, player in pairs(getElementsByType("player")) do unbindKey ( player, "f3", "down", tapP) end end) 
  
function tapP() 
triggerClientEvent(source,"tPan",getRootElement()) 
end 
  
--Client-side 
function tp() 
local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true ) 
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) 
local tabMap = guiCreateTab( "information", tabPanel ) 
local tabHelp = guiCreateTab( "Need Help?", tabPanel ) 
guiCreateLabel(0.02,0.04,0.94,0.2,"This server By|x[Dev-PoinT]x",true,tabMap) 
guiCreateLabel(0.02,0.04,0.94,0.92,"Email:[email protected]",true,tabHelp) 
end 
  
addEventHaadler("onClientResourceStart",resourceRoot,function() tp() end) 
addEvent("tPan",true) 
addEventHandler("tPan",getRootElement(), function() guiSetVisible(myWindow, not guiGetVisible(myWiindw)) showCursor(not isCursorShowing()) end) 

Link to comment

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...