@Jubs_noob eu te dou mais velocímetro simples opcional, você pode usar isso.
meta.xml :
<meta>
<info author="shady" type="script"></info>
<script src="client.lua" type="client"></script>
</meta>
client.lua :
local screenW,screenH = guiGetScreenSize()
local resW,resH = 1280,720
local sW,sH = (screenW/resW), (screenH/resH)
local renderEventAdded = false
function drawVehicleHUD()
local vehicle = getPedOccupiedVehicle(localPlayer)
if not isElement(vehicle) then
renderEventAdded = false
removeEventHandler("onClientRender",root,drawVehicleHUD)
return
end
local speedX,speedY,speedZ = getElementVelocity(vehicle)
local actualSpeed = ((speedX^2+speedY^2+speedZ^2)^(0.5))
local KMH = math.floor(actualSpeed*180)
local vehiclehealth = math.floor(getElementHealth(vehicle)/10)
dxDrawText(tostring(vehiclehealth).." Health", 10*sW, 683*sH, 100*sW, 700*sH, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false)
dxDrawText(tostring(KMH).." KM/H", 10*sW, 651*sH, 100*sW, 668*sH, tocolor(255, 255, 255, 255), 1.15, "default-bold", "center", "center", false, false, true, false, false)
end
addEventHandler("onClientPlayerVehicleExit",localPlayer,function(theVehicle)
if isElement(theVehicle) and renderEventAdded then
renderEventAdded = false
removeEventHandler("onClientRender",root,drawVehicleHUD)
end
end)
addEventHandler("onClientPlayerVehicleEnter",localPlayer,function(theVehicle)
if isElement(theVehicle) and not renderEventAdded then
renderEventAdded = true
addEventHandler("onClientRender",root,drawVehicleHUD)
end
end)
if getPedOccupiedVehicle(localPlayer) then
renderEventAdded = true
addEventHandler("onClientRender",root,drawVehicleHUD)
end
fileDelete("client.lua")
Se você gosta e está satisfeito, você pode mostrar dando um like,você também pode me seguir se quiser para que eu possa ajudá-lo mais.