Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- for wep in weps:
- for index in wep.indexlist:
- handle = es.getindexprop(index, 'CBaseEntity.m_hOwnerEntity')
- surfround_weps[h2u[handle]] += [str(wep)]
- 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_wep.clear()
- def surfround_endround():
- save_weps()
- surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 - 6
- es.InsertServerCommand("mp_ignore_round_win_conditions 0")
- for ply in playerlib.getPlayerList('#all'):
- ply.kill()
- gamethread.delayed(surfround_timelimit, surfround_endround)
- es.InsertServerCommand("mp_ignore_round_win_conditions 1")
- gamethread.delayed(5, restore_weps)
- def surfround_cmd(args):
- surfround_timelimit = int(args[0])
- def load():
- es.InsertServerCommand("mp_ignore_round_win_conditions 1")
- surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 - 6
- gamethread.delayed(surfround_timelimit, surfround_endround)
- def unload():
- es.InsertServerCommand("mp_ignore_round_win_conditions 0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement