Advertisement
captmicro

Untitled

Sep 21st, 2011
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 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 = es.ServerVar('mp_timelimit')
  39. es.InsertServerCommand("mp_ignore_round_win_conditions 0")
  40. gamethread.delayed(surfround_timelimit, surfround_endround)
  41. es.InsertServerCommand("mp_ignore_round_win_conditions 1")
  42. gamethread.delayed(5, restore_weps)
  43.  
  44. def surfround_cmd(args):
  45. surfround_timelimit = int(args[0])
  46.  
  47. def load():
  48. es.InsertServerCommand("mp_ignore_round_win_conditions 1")
  49. surfround_timelimit = es.ServerVar('mp_timelimit')
  50. gamethread.delayed(surfround_timelimit, surfround_endround)
  51.  
  52. def unload():
  53. es.InsertServerCommand("mp_ignore_round_win_conditions 0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement