function draw ()
dxDrawLoading(196*sx/800, 482*sy/600,422*sx/800, 58*sy/600, 196*sx/800 , 450*sy/600 ,1.00*sx/800,tocolor(0,0,0,170),tocolor(0,255,0,170),5000)
--outputChatBox("Done Downloading",0,255,0)
setTimer(stopDraw, 5000,1)
end
addEventHandler("onClientRender",root,draw)
stopDraw()
removeEventHandler("onClientRender",root,draw)
end
local start = getTickCount()
function dxDrawLoading (x, y, width, height, x2, y2, size, color, color2, second)
local now = getTickCount()
local seconds = second or 5000
local color = color or tocolor(0,0,0,170)
local color2 = color2 or tocolor(255,255,0,170)
local size = size or 1.00
local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + seconds) - start), "Linear")
local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + seconds) - start),"Linear")
--dxDrawText ( "Loading ... "..math.floor(text).."%", x2, y2 , width, height, tocolor ( 0, 255, 0, 255 ), size, "pricedown" )
dxDrawRectangle(x, y ,width ,height -10, color)
dxDrawRectangle(x, y, with ,height -10, color2)
end