# hide the client's warmup text ("The match will begin when more players join", # "Press F3 to ready yourself") while the server stays in permanent warmup (PRE_GAME). # The client draws that text only while configstring CS_WARMUP (5) carries a nonzero # "time" (warmup sets \time\-1), so we send clients an empty CS_WARMUP instead. import minqlx CS_WARMUP = 5 class nowarmuptext(minqlx.Plugin): def __init__(self): super().__init__() self.add_hook("set_configstring", self.handle_set_configstring, priority=minqlx.PRI_HIGHEST) self.add_hook("map", self.handle_map) # The first map was set up before this plugin loaded: clear the value it stored. minqlx.set_configstring(CS_WARMUP, "") self.log_warmup("loaded") def handle_set_configstring(self, index, value): if index == CS_WARMUP and value: return "" def handle_map(self, mapname, factory): self.log_warmup_later() @minqlx.delay(2) def log_warmup_later(self): self.log_warmup("map loaded") def log_warmup(self, when): self.logger.info("nowarmuptext %s: CS_WARMUP=%r g_gameState=%s", when, minqlx.get_configstring(CS_WARMUP), minqlx.get_cvar("g_gameState"))