Well, this might sound noob but.. I would like to know how to show ONLY the entire value in this script.
function vehiclestatus ( )
local car = getPedOccupiedVehicle (localPlayer)
local sx, sy, sz = getElementVelocity (car)
local speed = (sx^2 + sy^2 + sz^2)^(0.5)
local kmh = speed*180
local health = getElementHealth (car)
local currenthealth = health/10
dxDrawText ( "Speed: "..tostring(kmh).."Kph", 1000, screenHeight - 37, screenWidth, screenHeight, tocolor ( 220, 220, 220, 200 ), 1.5, "default" )
dxDrawText ( "Health: "..tostring(currenthealth).."%", 1000, screenHeight - 55, screenWidth, screenHeight, tocolor ( 220, 220, 220, 200 ), 1.5, "default" )
end
function HandleTheRender ( )
addEventHandler ( "onClientRender", root, vehiclestatus )
end
addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRender )
E.g: If the health is in 86.11585335685 % I would like to make it show ONLY 86%
Thanks since now