somebody1997 Posted March 31, 2012 Share Posted March 31, 2012 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 Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 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) then showCursor (false) removeEventHandler("onClientRender",root, Messenger_On_Render) shown = false else showCursor (true) addEventHandler("onClientRender",root, Messenger_On_Render) shown = true end end addCommandHandler ("chat", Messenger_Open_or_Close ) bindKey( "F2", "down", Messenger_Open_or_Close ) Link to comment
somebody1997 Posted March 31, 2012 Author Share Posted March 31, 2012 Yeah Thanks it works ^^ love you <3 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