Jump to content

[HELP!!] cooldown dont WORK!!


Murilo_apa

Recommended Posts

 
local cooldown = {}

local tick = getTickCount()

function dxConce()
    if exibindo_painelC == false then
        if cooldown[element] and tick - cooldown[element] < 5000 then
            return
        end
        cooldown = tick
        addEventHandler("onClientRender", root, drawConce)
        exibindo_painelC = true
        bindKey('backspace','down', function()
            if exibindo_painelC == true then
                removeEventHandler("onClientRender", root, drawConce)
                setCameraTarget (localPlayer)
                exibindo_painel = false
            end
        end)
    end
end
Help me please! after I enter the marker for the first time it stops working! looks like an error with the cooldown, but I can't identify it (I'm using the translator).
Link to comment
4 hours ago, Murilo_apa said:
 
local cooldown = {}

local tick = getTickCount()

function dxConce()
    if exibindo_painelC == false then
        if cooldown[element] and tick - cooldown[element] < 5000 then
            return
        end
        cooldown = tick
        addEventHandler("onClientRender", root, drawConce)
        exibindo_painelC = true
        bindKey('backspace','down', function()
            if exibindo_painelC == true then
                removeEventHandler("onClientRender", root, drawConce)
                setCameraTarget (localPlayer)
                exibindo_painel = false
            end
        end)
    end
end
Help me please! after I enter the marker for the first time it stops working! looks like an error with the cooldown, but I can't identify it (I'm using the translator).
local cooldown = {}

function dxConce()
    if exibindo_painelC == false then
        local tick = getTickCount() -- fixed
        if cooldown[element] and tick - cooldown[element] < 5000 then
            return
        end
        cooldown = getTickCount() --fixed
        addEventHandler("onClientRender", root, drawConce)
        exibindo_painelC = true
        bindKey('backspace','down', function()
            if exibindo_painelC == true then
                removeEventHandler("onClientRender", root, drawConce)
                setCameraTarget (localPlayer)
                exibindo_painel = false
            end
        end)
    end
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...