View Single Post
shortguy
Member
Join Date: Jul 2009
Old 08-01-2015 , 21:22   Re: How can i disallow comand if mp_roundtime - currenttimeROUND > 5
Reply With Quote #3

Since I can't really find a game property to track current round time, you can use this snippet I created here:

https://gist.github.com/roflmuffin/bed001ee2d12cb49deff

It's in transitional syntax but it should be easy to understand. When the round starts we keep track of the time in a global variable, and when we want to know the time we just query the current time - when the round started.

I've put them in functions and included the example command for you. Just change 5 to however many seconds.
shortguy is offline