Jump to content

[Help]How to make real time dx text


Xierra

Recommended Posts

explain it more?

textToShow = ""
function showTextDx()
dxDrawText(textToShow, 0, 70/100*height, width, 0, tocolor(255, 30, 30, 255), 1.5, "default-bold", "center", "top", false, false, false)
end
addEventHandler("onClientFrame", getRootElement(), showTextDx)
 
setTimer(function()
--textToShow = tostring(math.random(1,666))
time = getRealTime()
   hours = time.hour
   minutes = time.minute
   textToShow = hours..':'..minutes
end, 500)

something like that?

this is completly unuseful, just wanted to show you what i mean

edit:

edited, maybe you actually meant that :P (thx JustDance)

Edited by Guest
Link to comment

well, i can try to explain...

function getspeed(player,mph)
  unit = mph and 100 or 160.9 --if mph argument set to true then use mph convertion, else use kph
  vx,vy,vz = getElementVelocity( getPedOccupiedVehicle( player ) or player )  --not sure, will getting speed of player work?
return math.floor( ( vx ^ 2 + vy ^ 2 + vz ^ 2 ) ^ 0.5 * unit + 0.5 )  --it could be shorter without rounding
end

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