Jump to content

مساعده بالكود


Recommended Posts

    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

Link to comment
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)
	if (not isTimer(myTimer)) then
		myTimer = setTimer(stopDraw, 5000, 1)
	end
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

 

  • Like 1
Link to comment
28 minutes ago, HassoN said:

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)
	if (not isTimer(myTimer)) then
		myTimer = setTimer(stopDraw, 5000, 1)
	end
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

 

الحيين الوحة ما تشتغل وجبتلي هذة الرسالة في debug

<eof> expected near 'end'

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...