Jump to content

Help


Recommended Posts

local window = guiCreateWindow ( 400, 100, 100, 100, "test", false ) 
guiSetVisible (window,false) 
  
  
bindKey ("F2", "down", -- key show windows 
function ( )  
        if ( guiGetVisible ( window ) == true ) then            
                guiSetVisible ( window, false )  
        else               
                guiSetVisible ( window, true ) 
                showCursor (true) 
        end 
end 
) 
  
bindKey ("F9", "down", --key stop cursor 
function ( )  
        showCursor (false) 
end 
) 

Link to comment

I have my panel

This is my client.lua

local isPlayerViewingPanel = false 
local sw,sh = guiGetScreenSize() 
  
function dxDrawTheImage ( ) 
    if isPlayerViewingPanel then 
        dxDrawImage (240, 145, 550, 480, "window.png" ) 
        dxDrawText ( "Rules", sw/2 - 26, sh/2 - 230, sw/2 + 175, sh/2 + 80, tocolor ( 255, 255, 255, 255 ), 1.6, "default-bold") 
    end 
end 
  
addEventHandler ( "onClientRender", root, dxDrawTheImage ) 
  
bindKey("f6", "down",function() 
  
    isPlayerViewingPanel = not isPlayerViewingPanel 
end) 

I want to make this function

Press f6 (Open Panel) start cursor, Press f6 (Close Panel) stop cursor? (I am very noob in this)

Link to comment
local isPlayerViewingPanel = false 
local sw,sh = guiGetScreenSize() 
  
function dxDrawTheImage ( ) 
    if isPlayerViewingPanel then 
        dxDrawImage (240, 145, 550, 480, "window.png" ) 
        dxDrawText ( "Rules", sw/2 - 26, sh/2 - 230, sw/2 + 175, sh/2 + 80, tocolor ( 255, 255, 255, 255 ), 1.6, "default-bold") 
    end 
end 
  
addEventHandler ( "onClientRender", root, dxDrawTheImage ) 
  
bindKey("f6", "down",function()  
    if ( isPlayerViewingPanel == true ) then           
        isPlayerViewingPanel = false  
        showCursor (false) 
    else               
        isPlayerViewingPanel = true  
        showCursor (true) 
    end 
end 
) 
  

Link to comment
local isPlayerViewingPanel = false 
local sw,sh = guiGetScreenSize() 
  
function dxDrawTheImage ( ) 
    if isPlayerViewingPanel then 
        dxDrawImage (240, 145, 550, 480, "window.png" ) 
        dxDrawText ( "Rules", sw/2 - 26, sh/2 - 230, sw/2 + 175, sh/2 + 80, tocolor ( 255, 255, 255, 255 ), 1.6, "default-bold") 
    end 
end 
  
addEventHandler ( "onClientRender", root, dxDrawTheImage ) 
  
bindKey("f6", "down",function()  
    if ( isPlayerViewingPanel == true ) then           
  
        isPlayerViewingPanel = false  
        showCursor (false) 
    else               
        isPlayerViewingPanel = true  
        showCursor (true) 
    end 
end 
) 
  

I appreciate your help, people like you there few

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