I can let the panel appear but when i want that the panel disappears then nothing happens? What do I wrong ? Please, help me
local sWidth, sHeight = guiGetScreenSize()
local px = sWidth/800
local py = sHeight/600
function Messenger_On_Render ()
dxDrawText("*****",415.0*px,152.0*py,565.0*px,168.0*py,tocolor(0,221,255,255),0.9*py,"beckett","center","center",false,false,false)
dxDrawImage(369.0,135.0,607.0,433.0,"background.png",180.0,0.0,0.0,tocolor(50,50,50,255),false)
dxDrawImage(369.0,170.0,607.0,410.0,"background.png",180.0,0.0,0.0,tocolor(255,255,255,255),false)
dxDrawText("*****",785.0,583.0,975.0,610.0,tocolor(0,221,255,255),0.9,"beckett","left","top",false,false,false)
dxDrawText("*****",375.0,139.0,905.0,165.0,tocolor(0,221,255,255),1.0,"bankgothic","left","center",false,false,false)
dxDrawText("*****",375.0,139.0,905.0,165.0,tocolor(90,90,90,255),1.0,"bankgothic","left","center",false,false,false)
end
local shown = false
function Messenger_Open_or_Close ()
if (shown == true) then
showCursor (false)
removeEventHandler("onClientRender",getRootElement(), Messenger_On_Render)
elseif (shown == false) then
showCursor (true)
addEventHandler("onClientRender",getRootElement(), Messenger_On_Render)
end
end
addCommandHandler ("chat", Messenger_Open_or_Close )
bindKey( "F2", "down", Messenger_Open_or_Close )
The * Are just the text what i want to have in it. That can be fixed by myself