Mark0 Posted September 8, 2012 Share Posted September 8, 2012 i think the script is right but it's not work i can't see the rulesmemo and the infomemo local textrules = "Rules." local textinfo = "Information." function WindowRules() infoWindow = guiCreateWindow(0.1988,0.2317,0.6363,0.6817,"info",true) guiSetAlpha(infoWindow,1) ino_ImG = guiCreateStaticImage(0.0177,0.0489,0.9646,0.2958,"ino.png",true,infoWindow) buttonRules = guiCreateButton(0.2811,0.6777,0.1324,0.1653,"Rules",true,ino_ImG) guiSetAlpha(buttonRules,1) guiSetFont(buttonRules,"default-bold-small") buttoninfo = guiCreateButton(0.5845,0.6694,0.1446,0.157,"Information",true,ino_ImG) guiSetAlpha(buttoninfo,1) guiSetFont(buttoninfo,"default-bold-small") memoInfo = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textinfo,false,infoWindow) memoRules = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textrules,false,infoWindow) guiMemoSetReadOnly( memoInfo, true ) guiMemoSetReadOnly( memoRules, true ) guiWindowSetSizable(infoWindow,false) guiSetVisible( infoWindow, false ) end addEventHandler("onClientResourceStart", resourceRoot, WindowRules) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == buttonInfo ) then guiSetVisible( memoInfo, true ) guiSetVisible( memoRules, false ) elseif ( source == buttonRules ) then guiSetVisible( memoRules, true ) guiSetVisible( memoInfo, false ) end end ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) guiSetVisible( memoInfo, not guiGetVisible ( memoInfo ) ) guiSetVisible( memoRules, true) showCursor ( not isCursorShowing( ) ) end bindKey ( "F1","down", infoShow ) <meta> <info name="Info" author="Mark0" description="" version="" type="script"></info> <script src="info.lua" type="client"></script> <file src="ino.png" /> </meta> Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 (edited) What window do you want up first for default? try this: local textrules = "Rules." local textinfo = "Information." local infoWindow = guiCreateWindow(0.1988,0.2317,0.6363,0.6817,"info",true) guiWindowSetSizable(infoWindow,false) guiSetAlpha(infoWindow,1) local ino_ImG = guiCreateStaticImage(0.0177,0.0489,0.9646,0.2958,"ino.png",true,infoWindow) local buttonRules = guiCreateButton(0.2811,0.6777,0.1324,0.1653,"Rules",true,ino_ImG) guiSetAlpha(buttonRules,1) guiSetFont(buttonRules,"default-bold-small") local buttoninfo = guiCreateButton(0.5845,0.6694,0.1446,0.157,"Information",true,ino_ImG) guiSetAlpha(buttoninfo,1) guiSetFont(buttoninfo,"default-bold-small") local memoInfo = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textinfo,false,infoWindow) guiMemoSetReadOnly( memoInfo, true ) local memoRules = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textrules,false,infoWindow) guiMemoSetReadOnly( memoRules, true ) guiSetVisible( memoInfo, false ) guiSetVisible( memoRules, false ) guiSetVisible( infoWindow, false ) addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == buttonInfo ) then guiSetVisible( memoInfo, true ) guiSetVisible( memoRules, false ) elseif ( source == buttonRules ) then guiSetVisible( memoRules, true ) guiSetVisible( memoInfo, false ) end end ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F1","down", infoShow ) Edited September 8, 2012 by Guest Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 What window do you want up first? infoWindow i can see the window+the image+the buttons but the memos no It's work like my window i can't see the memos too Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 oh, ok, try the script again please Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 oh, ok, try the script again please The same + when i hide the window the Cursor stay Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 ok, try this now: local textrules = "Rules." local textinfo = "Information." local infoWindow = guiCreateWindow(0.1988,0.2317,0.6363,0.6817,"info",true) guiWindowSetSizable(infoWindow,false) guiSetAlpha(infoWindow,1) local ino_ImG = guiCreateStaticImage(0.0177,0.0489,0.9646,0.2958,"ino.png",true,infoWindow) local buttonRules = guiCreateButton(0.2811,0.6777,0.1324,0.1653,"Rules",true,ino_ImG) guiSetAlpha(buttonRules,1) guiSetFont(buttonRules,"default-bold-small") local buttoninfo = guiCreateButton(0.5845,0.6694,0.1446,0.157,"Information",true,ino_ImG) guiSetAlpha(buttoninfo,1) guiSetFont(buttoninfo,"default-bold-small") local memoInfo = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textinfo,false,infoWindow) guiMemoSetReadOnly( memoInfo, true ) local memoRules = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textrules,false,infoWindow) guiMemoSetReadOnly( memoRules, true ) guiSetVisible( memoInfo, false ) guiSetVisible( memoRules, false ) guiSetVisible( infoWindow, false ) addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == buttonInfo ) then guiSetVisible( memoInfo, true ) guiSetVisible( memoRules, false ) elseif ( source == buttonRules ) then guiSetVisible( memoRules, true ) guiSetVisible( memoInfo, false ) end end ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) showCursor ( guiGetVisible(infoWindow) ) --let's see if the gui is visible end bindKey ( "F1","down", infoShow ) Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 Cursor Fixed ty but i can't see the memos Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 I think the memos are miss coordinated What did you use to make this gui? Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 I think the memos are miss coordinatedWhat did you use to make this gui? guieditor and you can try the script in your local sv Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 ok, Do you still have the gui up on your local server? if you do, please take a screenshot of it and post it here. oh, BTW, it's the same for my local server Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 (edited) ok, Do you still have the gui up on your local server?if you do, please take a screenshot of it and post it here. ok wait well it's not the same gui but it shoold be like this ... Edited September 8, 2012 by Guest Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 ok, I'll try making it for you BTW, which one is for Rules and Info? Link to comment
Mark0 Posted September 8, 2012 Author Share Posted September 8, 2012 ok, I'll try making it for you lool ok ty if you like i will send you the picture ? Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 Found the problem!!! try this: local textrules = "Rules." local textinfo = "Information." local infoWindow = guiCreateWindow(0.1988,0.2317,0.6363,0.6817,"info",true) guiWindowSetSizable(infoWindow,false) guiSetAlpha(infoWindow,1) local ino_ImG = guiCreateStaticImage(0.0177,0.0489,0.9646,0.2958,"ino.png",true,infoWindow) local buttonRules = guiCreateButton(0.2811,0.6777,0.1324,0.1653,"Rules",true,ino_ImG) guiSetAlpha(buttonRules,1) guiSetFont(buttonRules,"default-bold-small") local buttoninfo = guiCreateButton(0.5845,0.6694,0.1446,0.157,"Information",true,ino_ImG) guiSetAlpha(buttoninfo,1) guiSetFont(buttoninfo,"default-bold-small") local memoInfo = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textinfo,true,infoWindow) --forgot to change to true guiMemoSetReadOnly( memoInfo, true ) local memoRules = guiCreateMemo(0.0177,0.3521,0.9646,0.6259,textrules,true,infoWindow)-- same here guiMemoSetReadOnly( memoRules, true ) guiSetVisible( memoInfo, false ) guiSetVisible( memoRules, false ) guiSetVisible( infoWindow, false ) addEventHandler ( "onClientGUIClick", guiRoot, function ( ) if ( source == buttonInfo ) then guiSetVisible( memoInfo, true ) guiSetVisible( memoRules, false ) elseif ( source == buttonRules ) then guiSetVisible( memoRules, true ) guiSetVisible( memoInfo, false ) end end ) function infoShow ( ) guiSetVisible ( infoWindow, not guiGetVisible ( infoWindow ) ) showCursor ( guiGetVisible(infoWindow) ) --let's see if the gui is visible end bindKey ( "F1","down", infoShow ) you forgot to change the false to a true for the memo relative 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