Jump to content

Some help guys


Mark0

Recommended Posts

Posted

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> 
  

Posted (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 by Guest
Posted
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 :|

Posted

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 ) 

Posted
I think the memos are miss coordinated

What did you use to make this gui?

guieditor and you can try the script in your local sv

Posted

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

Posted (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 by Guest
Posted

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

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