Why are you storing fuel as a string? store it as an integer, and then use the 'tostring' to output it in your directX drawing.
setTimer(
function( )
for i, v in ipairs ( getElementsByType("vehicle") ) do
if ( tonumber( getElementData(v, "fuel") ) == 0 ) then
setElementData( v, "fuel", 50, true)
-- outputChatBox( v ) 'v' is a vehicle element, you can't output it to chatbox..
end
end
end, 500, 0
)
local fuel = getElementData( getPedOccupiedVehicle(localPlayer), "fuel" )
dxDrawBorderedText("Fuel: ".. tostring( fuel ) .."%", screenWidth*0.750, screenHeight*0.9, screenWidth, screenHeight, tocolor(255, 255, 255), scale, "arial", "left", "center")