Jump to content

Flashing label


Artisz

Recommended Posts

Hi!

I want to create a flashing gui label. It's disappearing slowly, and appear, but once a time. Next time it doing it when I restart the resource.

Sorry for my English!

Here is the code:

(There is no error, warning)

local prog = "eltunes" 
addEventHandler( "onClientResourceStart", getRootElement( ), 
    function () 
    setTimer( function() 
        local alpha = guiGetAlpha(kattints) 
        if(alpha ~= 0 and prog == "eltunes") then 
            guiSetAlpha(kattints, alpha - 0.1) 
        elseif(alpha == 0 and prog == "eltunes") then 
            prog = "elotunes" 
        end 
        if(alpha ~= 100 and prog == "elotunes") then 
            guiSetAlpha(kattints, alpha + 0.1) 
        elseif(alpha == 100 and prog == "elotunes") then 
            prog = "eltunes" 
        end 
    end, 70, 0) 
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...