import es, cmdlib, playerlib, weaponlib, gamethread info = es.AddonInfo() info.name = "Surf Round Time Limit Hax" info.basename = "surfround" info.version = "HERPDERPDURR" info.url = "microvnet.info" info.description= "SUP3R L33T 5URF" info.author = "Capt. Micro" info.contact = "arrowflyer@gmail.com" info.tags = "round,time,limit,weapons" surfround_weps = {} surfround_timelimit = 0 def save_weps(): global surfround_weps weps = weaponlib.getWeaponList('#all') h2u = {} for ply in playerlib.getPlayerList('#all'): handle = es.getplayerhandle(ply.userid) h2u[handle] = str(ply.userid) surfround_weps[str(ply.userid)] = [] for wep in weps: for index in wep.indexlist: handle = es.getindexprop(index, 'CBaseEntity.m_hOwnerEntity') surfround_weps[h2u[handle]] += [wep.name] def restore_weps(): global surfround_weps weps = weaponlib.getWeaponList('#all') for wep in weps: for index in wep.indexlist: es.remove(index) for ply in playerlib.getPlayerList('#all'): weapons = surfround_weps[str(ply.userid)] for weapon in weapons: es.server.queuecmd('es_xgive %s %s' % (ply.userid, weapon)) surfround_weps.clear() def surfround_endround(): save_weps() es.InsertServerCommand("mp_ignore_round_win_conditions 0") for ply in playerlib.getPlayerList('#all'): ply.kill() surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 gamethread.delayed(surfround_timelimit, surfround_endround) es.InsertServerCommand("mp_ignore_round_win_conditions 1") gamethread.delayed(5, restore_weps) def load(): es.InsertServerCommand("mp_ignore_round_win_conditions 1") surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 gamethread.delayed(surfround_timelimit, surfround_endround) def unload(): es.InsertServerCommand("mp_ignore_round_win_conditions 0")