Jump to content

Can't see Window in Ingame


BriGhtx3

Recommended Posts

Hey Guys,

i have a little question :

Why can't I see the window in the Ingame? Is there any error in the Code?

function Status() 
    local sWidth, sHeight = guiGetScreenSize() 
    local Width,Height = 800,45 
    local X = (sWidth/2) - (Width/2) 
    local Y = sHeight - (Height/2) 
  
    local StatusW = guiCreateWindow ( X, Y, Width, Height, "SoLA-Status", true )  
        guiWindowSetMovable ( StatusW, true ) 
        guiWindowSetSizable ( StatusW, false ) 
  
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, StatusW )      
local tabAll = guiCreateTab( "Allgemein", tabPanel )                
local tabBed = guiCreateTab( "Bedürfnisse", tabPanel )                    
local tabRel = guiCreateTab( "Regeln", tabPanel )   
guiCreateButton(0.02, 0.04, 0.94, 0.2, "JOB", true, tabAll) 
guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Die Bedürfnisse : ", true, tabBed) 
guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Keine unnötigen ADs, Kein Töten (ohne Grund), kein Flaming, kein Spamming", true, tabRel) 
guiSetVisible(StatusW, false) 
end 
  
addEventHandler("onClientResourceStart",resourceRoot,Status) 

Help would be really nice (This is my first self-made script :mrgreen: )

Greetz

Edit :

I forgot to say whether I see any errors or if the console shows any errors :

Really quick : No :D

Link to comment

You mean sth. like this?

guiSetVisible ( StatusW, false) 
end 
addEventHandler("onClientResourceStart",resourceRoot,Status) 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),  
    function () 
        Status() 
    end 
) 
  

Link to comment

Now my Script looks like this :

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),toggleWindowVis) 
  
function toggleWindowVis(key,keyState) 
if guiGetVisible(StatusW) then 
guiSetVisible ( StatusW, false) 
else 
guiSetVisible ( StatusW, true) 
end 
end 
bindKey ( "F1", "down", Status) 
  

It doesn't work either

Edited by Guest
Link to comment

Although, y'know... If you want teh window there all the time, you just have to take out line 18 from your original code.

Line is was: guiSetVisible(StatusW, false)

You were setting it to not show by default, what I just tried to help you do was find a way to toggle it instead, but if you want it to show all the time, don't both with the toggle shit and just remove that line.

Link to comment
Oh, my bad, I copied some :~ from the Wiki and just edited it, I never edited it properly. :P

Line to: bindKey("F1","down",toggleWindowVis)

Use that instead, sorry.

doesn't work.

Although, y'know... If you want teh window there all the time, you just have to take out line 18 from your original code.

Line is was: guiSetVisible(StatusW, false)

You were setting it to not show by default, what I just tried to help you do was find a way to toggle it instead, but if you want it to show all the time, don't both with the toggle :~ and just remove that line.

Ok i tested it without guiSetVisible(StatusW,false), but i don't see it anyway. I think this is because of the Login Panel I have. The Login Panel makes a blackscreen... I tested it with some outputchat Text, and the text shows, but the window is still not visible.

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