Jump to content

Global delay timer


kevenvz

Recommended Posts

Hey I am working on a chatsound system. I want to add a globaldelay but don't know how to do it. My current code won't work!

  
  
function addGlobalCommandDelay(element) 
  local executetimeg = globalDelay + 1 
  setElementData(element,"globalCommandDelay",tonumber(globalDelay)) 
  setTimer(timerGlobalCommandDelay,1000,executetimeg,element) 
end 
  
function timerGlobalCommandDelay(element) 
  gdelay = getElementData(element,"globalCommandDelay") 
  if gdelay > 0 then 
    setElementData(element,"globalCommandDelay",gdelay-1) 
    return 
  end 
end 

Hope you can help, thanks!

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