Disables the semi https://gist.github.com/3442243
inspired by the famous GreaseMonkey
			
				from pyspades.constants import *
def apply_script(protocol, connection, config):
    class EverythingSucksConnection(connection):
        def on_weapon_set(self, wpnid):
            if wpnid == RIFLE_WEAPON or wpnid == SMG_WEAPON:
                self.send_chat("This weapon is forbidden on this server because it sucks.")
                return False
            return connection.on_weapon_set(self, wpnid)
        def set_weapon(self, weapon, local = False, no_kill = False, *args, **kwargs):
            if weapon == RIFLE_WEAPON or weapon == SMG_WEAPON:
                self.send_chat("This weapon is forbidden on this server because it sucks.")
                self.send_chat("You've been given a real man's gun.")
                weapon = SHOTGUN_WEAPON
                if local:
                    no_kill = True
                    local = False
                return connection.set_weapon(self, weapon, local, no_kill, *args, **kwargs)
    
    return protocol, EverythingSucksConnection

Users browsing this forum: No registered users and 14 guests