Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # written under the influcence of marijuana
- # BY: Capt. Micro
- # .
- # M
- # dM
- # MMr
- # 4MMML .
- # MMMMM. xf
- # . "MMMMM .MM-
- # Mh.. +MMMMMM .MMMM
- # .MMM. .MMMMML. MMMMMh
- # )MMMh. MMMMMM MMMMMMM
- # 3MMMMx. 'MMMMMMf xnMMMMMM"
- # '*MMMMM MMMMMM. nMMMMMMP"
- # *MMMMMx "MMMMM\ .MMMMMMM=
- # *MMMMMh "MMMMM" JMMMMMMP
- # MMMMMM 3MMMM. dMMMMMM .
- # MMMMMM "MMMM .MMMMM( .nnMP"
- # =.. *MMMMx MMM" dMMMM" .nnMMMMM*
- # "MMn... 'MMMMr 'MM MMM" .nMMMMMMM*"
- # "4MMMMnn.. *MMM MM MMP" .dMMMMMMM""
- # ^MMMMMMMMx. *ML "M .M* .MMMMMM**"
- # *PMMMMMMhn. *x > M .MMMM**""
- # ""**MMMMhx/.h/ .=*"
- # .3P"%....
- # nP" "*MMnx
- import es, playerlib, popuplib
- info = es.AddonInfo()
- info.name = "MicroBuy"
- info.basename = "microbuy"
- info.version = "HERPDERPDURR"
- info.url = "microvnet.info"
- info.description= "SUP3R L33T BUY M3NU"
- info.author = "Capt. Micro"
- info.contact = "arrowflyer@gmail.com"
- info.tags = "buy,menu,weapons"
- microbuy_menu = None
- microbuy_items = {
- "weapon_glock":500,
- "weapon_usp":350,
- "weapon_deagal":1000,
- "weapon_fiveseven":500,
- "weapon_p228":500,
- "weapon_elite":1000,
- "weapon_mac10":800,
- "weapon_tmp":800,
- "weapon_mp5navy":1000,
- "weapon_ump45":1500,
- "weapon_p90":1000,
- "weapon_m3":2000,
- "weapon_xm1014":2000,
- "weapon_galil":1250,
- "weapon_famas":1250,
- "weapon_ak47":1250,
- "weapon_m4a1":1250,
- "weapon_sg552":1500,
- "weapon_aug":1500,
- "weapon_scout":2000,
- "weapon_g3sg1":2500,
- "weapon_sg550":2500,
- "weapon_awp":3500,
- "weapon_m249":2500,
- "weapon_hegrenade":300,
- "weapon_flashbang":300,
- "weapon_smokegrenade":300
- }
- def menu_handler(userid, choice, menuname):
- info = choice.split(',')
- ply = playerlib.getPlayer(str(userid))
- price = int(info[1])
- if (ply.cash >= price):
- es.server.queuecmd('es_xgive %s %s' % (userid, info[0]))
- ply.cash -= price
- def load():
- global microbuy_menu
- microbuy_menu = popuplib.easymenu('microbuy', None, menu_handler)
- microbuy_menu.settitle("MicroBuy")
- for item, price in microbuy_items.items():
- microbuy_menu.addoption("%s,%d"%(item,price),
- "%s [$%d]"%(item.split('_')[1],price))
- def es_player_chat(e):
- global microbuy_menu
- ply = playerlib.getPlayer(str(userid))
- if (e['text'][0:4] == '!buy')
- microbuy_menu.send(ply.userid)
- elif (e['text'][0:8] == '!announce'):
- args = e['text'].split(' ', 1)
- price = 7500
- if (ply.cash >= price):
- es.centermsg(args[1])
- ply.cash -= price
- def unload():
- global microbuy_menu
- microbuy_menu.delete()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement