or try this
function convertNumber ( number )
local formatted = number
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", "%1.%2")
if ( k==0 ) then
break
end
end
return formatted
end
function HudMoney()
local money2 = getPlayerMoney(getLocalPlayer())
local money = string.format ( "%.8f", getPlayerMoney ( getLocalPlayer ( ) ) )
if money2 < -0 then
dxDrawText("$"..money2.."", 1455, 53, 1478, 86, tocolor(255, 255, 255, 255), 1.50, "pricedown", "left", "top", false, false, false, false, false)
else
dxDrawText("$"..convertNumber(money).."", 1455, 53, 1478, 86, tocolor(255, 255, 255, 255), 1.50, "pricedown", "left", "top", false, false, false, false, false)
end
end