Jump to content

what is wrong?


yMassai

Recommended Posts

function painel_policial () 
      guiCreateWindow ( 230,200,250,200, "Information", true ) 
      guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, painel_policial ) 
      guiWindowSetSizable(painel_policia,false) 
      guiWindowSetMovable ( painel_policial, false ) 
      guiWindowSetSizable ( painel_policial, false ) 
end 
  
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), painel_policial ) 
  
function painelVisible() 
    if (guiGetVisible(painel_policial) == false) then 
        guiSetVisible(painel_policial,true) 
        showCursor(true) 
    else 
        guiSetVisible(painel_policial,false) 
        showCursor(false) 
    end 
end 
bindKey("F5","down",painelVisible) 

what is wrong?

Link to comment

As he said Aibo .

Correct code

Client Side :

function painel_policial () 
      painel_policial = guiCreateWindow ( 230,200,250,200, "Information", false ) 
      guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, painel_policial ) 
      guiWindowSetMovable ( painel_policial, false ) 
      guiWindowSetSizable ( painel_policial, false ) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), painel_policial ) 
  
function painelVisible() 
    if (guiGetVisible(painel_policial) == false) then 
        guiSetVisible(painel_policial,true) 
        showCursor(true) 
    else 
        guiSetVisible(painel_policial,false) 
        showCursor(false) 
    end 
end 
bindKey("F5","down",painelVisible) 

Edited by Guest
Link to comment
painel_policial = guiCreateWindow ( 230, 200, 250, 200, 'Information', false ) 
guiWindowSetMovable ( painel_policial, false ) 
guiWindowSetSizable ( painel_policial, false ) 
  
guiCreateButton ( 0.4, 0.85, 0.20, 0.15, 'OK', true, painel_policial ) 
  
bindKey ( 'f5', 'down', 
    function ( ) 
        guiSetVisible ( painel_policial, not guiGetVisible ( painel_policial ) ) 
        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...