Syntax: Select all
from filters.players import PlayerIter
from engines.server import engine_server
from entities.helpers import edict_from_index
def clientcommand(index, command, server_side=False):
edict = edict_from_index(index)
engine_server.client_command(edict, command, server_side)
for index in PlayerIter():
clientcommand(index, "r_screenoverlay test.vmt")
Using the cvars module, I wanted to remove the cheats flag from r_screenoverlay, but cvar.find_var('r_screenoverlay') returns None.
My last resort would be enabling sv_cheats before sending an overlay, and disabling it then again, but I wouldn't really like that. Any other ideas?