spAik Posted August 31, 2013 Share Posted August 31, 2013 addEventHandler('onGamemodeMapStart',getRootElement(), function() killTimer (votetime) local votetime = setTimer ( happen, 240000, 1 ) end) Hi i want to start a function on the start of a map. I know my script does not work, because I set the "votetime"variable after the killTimer-function. But how can I make it that a timer is created before the map, but the previous timer is also destroyed at mapstart? Link to comment
Castillo Posted August 31, 2013 Share Posted August 31, 2013 I'm not sure if I understand, you want to set a timer when a map starts, and if the timer was already started, kill it? Link to comment
Moderators IIYAMA Posted September 7, 2013 Moderators Share Posted September 7, 2013 addEventHandler('onGamemodeMapStart',getRootElement(), function() if isTimer(votetime) then killTimer (votetime) end local votetime = setTimer ( happen, 240000, 1 ) 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