Jump to content

.


DarkByte

Recommended Posts

Posted (edited)

Hello i wonder if it's possible to draw an animated bar, like decreasing slowly to the value and stop at the needed point and increasing slowly to the needed point, if so please show an example i have no idea how to do it..

Edited by Guest

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Yes that's it but when I'm restarting resource the bar grows, but it doesn't decrease, it's like dxDrawRectangle after loading.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

local width = 0

dxDrawRectangle(x,y,width,height,...)

setTimer(function()

Width = width + 1

,100,20)

Not tested, but this is the idea, you create a rectangle with the width as a var and you later change the var with a timer or onClientRender to have a smooth grow on the rectangle

 

●●●

Rage Gaming Society

Coming Soon

●●●

Posted

No, you don't understand me, the script it's fine but it doesn't decrease.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Well, i did this and everything works. Only grows and then then everything it's normal it doesn't decrease.

local healthStat = interpolateBetween(0,0,0,healthStat,0,0, (now - start) / ((start + 5000) - start), "OutQuad") 

Halp?

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Hello?

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted
No, you don't understand me, the script it's fine but it doesn't decrease.

You are right, I don't understand you, And I don't know on which script you are talking about, therefore I can't help.

 

●●●

Rage Gaming Society

Coming Soon

●●●

Posted
Well, i did this and everything works. Only grows and then then everything it's normal it doesn't decrease.
local healthStat = interpolateBetween(0,0,0,healthStat,0,0, (now - start) / ((start + 5000) - start), "OutQuad") 

Halp?

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

The bar grows only up when i'm restarting the resource, after that it's like ordinary dxDrawRectangle but i want it to decrease and increase by the value given.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

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...