Jump to content

Possible to make custom network trouble text?


Recommended Posts

  • Moderators
1 hour ago, Patrick said:

Are you sure? I think it's always on top.

nope, didn't think about that. 😆

But since you can draw on top of the chat, it is still worth a try. Or just draw it double, but bigger.

 

  • Like 2
Link to post
  • Moderators
9 hours ago, IIYAMA said:

But since you can draw on top of the chat, it is still worth a try.

Good point 😅

  • Like 1
Link to post
16 hours ago, Patrick said:

Are you sure? I think it's always on top.

I think it can be hidden if you use DX functions, but not 100% sure. It did work for MTA version text on bottom right though.

Link to post
Posted (edited)
On 16/05/2021 at 11:42, Fist said:

I think it can be hidden if you use DX functions, but not 100% sure. It did work for MTA version text on bottom right though.

Example?

Edited by Maruchan
Link to post
Posted (edited)

For those who still wonder 😄

The idea of drawing on top of it with dx functions was actually good and it works!

Here is the result from what I tried:

LSoRK2s.png

This was done by drawing a rectangle with the size of the screen and some text over it and as you can see you can barely see the ***NETWORK TROUBLE*** text.

function onGotProblem(status)
	if status == 0 then -- we got a problem
		addEventHandler("onClientRender", root, networkWarning)
	else -- all good
		removeEventHandler("onClientRender", root, networkWarning)
	end
end
addEventHandler("onClientPlayerNetworkStatus", root, onGotProblem)


function networkWarning()
	-- Draw your stuff here
	dxDrawRectangle(...)
	dxDrawText(...)
end

 

Edited by SpecT
  • Like 2
  • Thanks 2
Link to post

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