Jump to content

dxDrawText


Recommended Posts

Guys i wan't this dxDrawText appears for 3 secs when someone type the command /ping

function checkPing()
        local ping = getPlayerPing(getLocalPlayer())
        setTimer(function()
		dxDrawText("#ff0000Your ping is: #00ff00"..ping.."", 805, 303, 1175, 338, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, true, false)
        end, 1000, 1)
	end
addCommandHandler("ping", checkPing)

 

Link to comment
  1. function checkPing()
  2. addEventHandler("onClientRender", root, drawPing)
  3. setTimer(function() removeEventHandler("onClientRender", root, drawPing) end, 3000, 1)
  4. end
  5. addCommandHandler("ping", checkPing)

       function drawPing()

      local ping = getPlayerPing(getLocalPlayer())

       dxDrawText("#ff0000Your ping is: #00ff00"..ping.."", 805, 303, 1175, 338, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, true, false)

end

Edited by Leo Messi
  • Thanks 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...