Advertisement
captmicro

Untitled

Sep 21st, 2011
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. import es, cmdlib, playerlib, weaponlib, gamethread
  2.  
  3. info = es.AddonInfo()
  4. info.name = "Surf Round Time Limit Hax"
  5. info.basename = "surfround"
  6. info.version = "HERPDERPDURR"
  7. info.url = "microvnet.info"
  8. info.description= "SUP3R L33T 5URF"
  9. info.author = "Capt. Micro"
  10. info.contact = "arrowflyer@gmail.com"
  11. info.tags = "round,time,limit,weapons"
  12.  
  13. surfround_weps = {}
  14. surfround_timelimit = 0
  15.  
  16. def save_weps():
  17. global surfround_weps
  18. weps = weaponlib.getWeaponList('#all')
  19. for wep in weps:
  20. for index in wep.indexlist:
  21. surfround_weps[es.getuserid(es.getindexprop(index,
  22. 'CBaseEntity.m_hOwnerEntity'))] += [str(wep)]
  23.  
  24. def restore_weps():
  25. global surfround_weps
  26. weps = weaponlib.getWeaponList('#all')
  27. for wep in weps:
  28. for index in wep.indexlist:
  29. es.remove(index)
  30. for ply in playerlib.getPlayerList('#all'):
  31. weapons = surfround_weps[ply.userid]
  32. for weapon in weapons:
  33. es.server.queuecmd('es_xgive %s %s' % (userid, weapon))
  34. surfround_wep.clear()
  35.  
  36. def surfround_endround():
  37. save_weps()
  38. surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 - 6
  39. es.InsertServerCommand("mp_ignore_round_win_conditions 0")
  40. for ply in playerlib.getPlayerList('#all'):
  41. ply.kill()
  42. gamethread.delayed(surfround_timelimit, surfround_endround)
  43. es.InsertServerCommand("mp_ignore_round_win_conditions 1")
  44. gamethread.delayed(5, restore_weps)
  45.  
  46. def surfround_cmd(args):
  47. surfround_timelimit = int(args[0])
  48.  
  49. def load():
  50. es.InsertServerCommand("mp_ignore_round_win_conditions 1")
  51. surfround_timelimit = int(es.ServerVar('mp_roundtime')) * 60 - 6
  52. gamethread.delayed(surfround_timelimit, surfround_endround)
  53.  
  54. def unload():
  55. es.InsertServerCommand("mp_ignore_round_win_conditions 0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement