Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import es, playerlib, weaponlib
- info = es.AddonInfo()
- info.name = "Flashbangs Only"
- info.basename = "flashbangsonly"
- info.version = "HERPDERPDURR"
- info.url = "b0mbnet.info"
- info.description= "SUP3R L33T G4M3 M0D3!!!"
- info.author = "Capt. Micro"
- info.contact = "arrowflyer@gmail.com"
- info.tags = "flash,bang,flashbang,only,gamemode,game,mode"
- vip = [
- "weapon_scout",
- ]
- ply = [
- "weapon_flashbang", # give the player two
- "weapon_flashbang", # you only get another when you hit someone
- ]
- g00nz = [
- #"Capt. Micro",
- #"Bomb Diggity",
- ]
- def stripweapon(handle, indexlist):
- for index in indexlist:
- if (es.getindexprop(index, 'CBaseEntity.m_hOwnerEntity') == handle):
- es.remove(index)
- def stripslot(userid, slot):
- weps = weaponlib.getWeaponList('#all')
- handle = es.getplayerhandle(userid)
- for wep in weps:
- if (wep.slot == slot):
- stripweapon(handle, wep.indexlist)
- def stripall(userid):
- weps = weaponlib.getWeaponList('#all')
- handle = es.getplayerhandle(userid)
- for wep in weps:
- stripweapon(handle, wep.indexlist)
- def player_spawn(event_var):
- player = playerlib.getPlayer(int(event_var['userid']))
- stripall(player.userid)
- try:
- g00nz.index(player.name)
- for itm in vip:
- es.server.queuecmd('es_xgive %s %s' % (str(player.userid), itm))
- except ValueError:
- pass
- for itm in ply:
- es.server.queuecmd('es_xgive %s %s' % (str(player.userid), itm))
- player.health = 1
- player.armor = 0
- def player_death(event_var):
- if event_var['weapon'] == "weapon_flashbang":
- es.server.queuecmd('es_xgive %s %s' % (str(event_var['attacker']), event_var['weapon']))
- def load():
- pass
- def unload():
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement