[SCRIPT] killnear

Intended for use on live public servers.
2 posts Page 1 of 1 First unread post
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


Kills players within a [radius] of you. Requested by defero
Code: Select all
"""
killnear
thepolm3
requested by Defero200
"""

from commands import add,admin

@admin
def killnear(connection,radius = 10):
    xb,yb,zb = connection.get_location()
    for player in connection.protocol.players.values():
        xa,ya,za = player.get_location()
        x,y=xa-xb,ya-yb
        if x*x+y*y<=radius**2 and not (player.god or player.admin or player==connection):
            player.kill()

add(killnear)

def apply_script(protocol,connection,config):
    return protocol,connection
Attachments
killnear.py
(498 Bytes) Downloaded 262 times
Last edited by thepolm3 on Sat Jul 20, 2013 6:51 pm, edited 1 time in total.
Defero200
Deuce
Posts: 8
Joined: Tue Apr 16, 2013 1:07 pm


Thank you :3 !!!
2 posts Page 1 of 1 First unread post
Return to “Completed Releases”

Who is online

Users browsing this forum: No registered users and 3 guests