Jump to content

Rectangle/GUI behind the chat.


LyricalMM

Recommended Posts

Hi !

              I think that the answer you are finding is already in dxDraw functions. All you have to do is set the value of argument of dxDraw function called postGUI to true. When postGUI is true, dxDraw will always be in front of every GUI element. If postGUI is false dxDraw always be behind any GUI element.

Link to comment
7 minutes ago, DeadthStrock said:

Hi !

              I think that the answer you are finding is already in dxDraw functions. All you have to do is set the value of argument of dxDraw function called postGUI to true. When postGUI is true, dxDraw will always be in front of every GUI element. If postGUI is false dxDraw always be behind any GUI element.

i didn't see that, thx :)

but how do I set the visibility to him? like a toggle command for it?

  • Like 1
Link to comment
5 hours ago, DeadthStrock said:

what do you mean by visibility to him ?

i solved it, for anyone who wants it:

sW, sH = guiGetScreenSize()
function draw()
dxDrawRectangle(sW*0, sH*0, 700, 600, tocolor ( 0, 0, 0, 255 ), false)
end



local show = false
function showSS()
	
	if show then
		removeEventHandler("onClientRender",root,draw)
		show=false
	elseif not show then
		addEventHandler("onClientRender",root,draw)
		show=true
	end
end

addCommandHandler("ss", showSS)

 

  • Like 1
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...