This is are the ways I tried to do it:
Code: Select all
def create_overlay(index, overlay, duration):
player = Player(index)
player.client_command('r_screenoverlay %s' % overlay)
player.delay(duration, remove_overlay, index)
def remove_overlay(index):
player = Player(index)
player.client_command('r_screenoverlay 0')
This will result in the following error:

The other thing I tried was:
Code: Select all
def create_overlay(index, overlay, duration):
player = Player(index)
player.client_command('r_screenoverlay %s' % overlay)
player.delay(duration, player.client_command, 'r_screenoverlay 0')
This would lead to this error:

I'm not sure what to do now, so any help is appreciated! :)