Restarting round when timer reaches 00:01
Posted: Wed Aug 24, 2016 5:52 pm
Im working on a plugin that when the round timer hits 00:01, the round auto restarts, this is what I got so far.
Now, even though I got experience in Python, I don't have much in sourcepython, so can anyone help? What Im trying to get it to do is when it hits the time 00:01 it will restart the round after 10 seconds or so. (This code has probably got errors all over it, and its only 4 lines :P)
Code: Select all
@Event('tf_map_time_remaining')
def tf_map_time_remaining(event):
if event # This line I don't know what to write.
engine_server.server_command('mp_restartgame 1\n')
Now, even though I got experience in Python, I don't have much in sourcepython, so can anyone help? What Im trying to get it to do is when it hits the time 00:01 it will restart the round after 10 seconds or so. (This code has probably got errors all over it, and its only 4 lines :P)