import es import playerlib info = es.AddonInfo() info['name'] = "Emergency Ammo" info['version'] = "1.0" info['author'] = "Frodo" info['url'] = "none" info['description'] = "Get Emergency Ammo" def load ## :) eaannounce = '1' ## should Emergency Ammo announce itself on round start? eacost = '100' ## how much does EA cost eainc = '20' ## how much ammo you will get... eamax = '100' ## maximum of your current ammo ## :( ex = es.exists('saycommand', 'ammo') if ex is '0': es.regsaycmd('/ammo', 'ea/ea', 'Get ammo when out of buyzone') def ea eacost = eacost - 1 uid = es.getcmduserid() userid = playerlib.getPlayer('uid') dead = userid.get('isdead') if dead = 0: money = userid.get('cash') if money > eacost: cammo = userid.get('ammo') if cammo > eamax or cammo = eamax: es.tell('uid', 'You cannot own more ammo.') elif cammo < eamax: cammo = cammo + eainc if cammo > eamax: cammo = eamax userid.set('ammo', 'cammo') elif money < eacost: es.tell('uid', 'Get more money then we can talk about your ammo!') elif dead = 1: es.tell('uid', 'You cannot buy ammo while dead!') def round_start(event_var) if eaannounce is 1: es.msg("#multi", "#lightgreen Emergency ammo #green is turned on, buy extra ammo when in trouble by writing #lightgreen /ammo!" )