Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Thomas R Jones (tjone270) - 08/10/2016
- import minqlx
- class infiniteammo(minqlx.Plugin):
- def __init__(self):
- self.add_hook("map", self.handle_map)
- self.add_hook("game_countdown", self.handle_game_countdown)
- self.set_cvar_once("qlx_infiniteAmmo", "0") # 0=normal ammo, 1=always, 2=during warmup only
- @minqlx.next_frame
- def handle_map(self, mapname, factory):
- # turn on infinite ammo for warm-up
- if self.get_cvar("qlx_infiniteAmmo", int) != 0:
- self.set_cvar("g_infiniteAmmo", "1")
- def handle_game_countdown(self):
- if (self.get_cvar("qlx_infiniteAmmo", int) == 2) or (self.get_cvar("qlx_infiniteAmmo", int) == 0):
- self.set_cvar("g_infiniteAmmo", "0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement