yMassai Posted April 3, 2012 Posted April 3, 2012 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?
sckatchof Posted April 3, 2012 Posted April 3, 2012 (edited) 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 April 3, 2012 by Guest
drk Posted April 3, 2012 Posted April 3, 2012 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 )
sckatchof Posted April 3, 2012 Posted April 3, 2012 Draken you have problem cursor don't show when he open gui.
drk Posted April 3, 2012 Posted April 3, 2012 You tested? It seems to work, it ever worked for me this way
sckatchof Posted April 3, 2012 Posted April 3, 2012 You tested? It seems to work, it ever worked for me this way Yes i tested it cursor doesn't show.
drk Posted April 3, 2012 Posted April 3, 2012 Then it's a MTA:SA bug Is your script client-side? It worked perfectly here.
sckatchof Posted April 3, 2012 Posted April 3, 2012 Then it's a MTA:SA bug Is your script client-side? It worked perfectly here. Yes my client side work i tested it
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now