Murilo_apa Posted November 26, 2022 Share Posted November 26, 2022 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
Shady1 Posted November 27, 2022 Share Posted November 27, 2022 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now