yMassai Posted April 3, 2012 Share 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? Link to comment
Aibo Posted April 3, 2012 Share Posted April 3, 2012 painel_policial is not a gui element. Link to comment
sckatchof Posted April 3, 2012 Share 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 Link to comment
drk Posted April 3, 2012 Share 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 ) Link to comment
sckatchof Posted April 3, 2012 Share Posted April 3, 2012 Draken you have problem cursor don't show when he open gui. Link to comment
drk Posted April 3, 2012 Share Posted April 3, 2012 You tested? It seems to work, it ever worked for me this way Link to comment
sckatchof Posted April 3, 2012 Share 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. Link to comment
drk Posted April 3, 2012 Share Posted April 3, 2012 Then it's a MTA:SA bug Is your script client-side? It worked perfectly here. Link to comment
sckatchof Posted April 3, 2012 Share 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 Link to comment
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