[edit]*IF YOU NEED THIS, YOU MAY USE IT!! I just read the entire thread LOL![/edit]
Maybe I have a solution..
I have been working on this and was going to delete it when I was rummaging through some old files.
It's in Python (the easiest damn language in the world..) and I got some examples from EventScripts website and some other scripts as well, but all in all, I wrote it to benefit the community.
Anyways, EVERYONE.. I PRESENT THE ANTI RETRY SCRIPT! (1.0 and in PYTHON)
place in /addons/eventscripts/anti_retry/ and name anti_retry.py!! =)
I started this like 2 or 3 weeks ago when I noticed that admins were trying to get players to stop rejoining and I just finished it tonight with some good ideas from some resources at eventscripts' directory of all the damn functions lol
anyways, the CODE!
ENJOY!!!!!!!
Code:
import es
#Created by sutt0n
#Special thanks to many Python references and examples and EventScripts
#Dedicated to the folks at N00BUnlimited!
#Naming base and sub variables
info = es.AddonInfo()
info.name = 'N/U AntiRejoin'
info.url = 'http://www.n00bunlimited.net/'
info.version = '1.0'
info.author = 'sutt0n'
info.basename = 'anti_retry'
es.ServerVar('anti_retry_ver',info.version,' By-> sutt0n').makepublic()
#Enabling variables and enabling the entire script
dead_players = []
disc_players = []
enabled = 1
#Defining the load() function
def load():
es.msg('#multi', '#green[#lightgreenAnti Retry#green]#default Loaded')
#Defining the unload() function
def unload():
es.msg('#multi', '#green[#lightgreenAnti Retry#green]#default Unloaded')
#When the round ends, disable the script and reset the variables
def round_end(ev):
global enabled, disc_players, dead_players
enabled = 0
disc_players = []
dead_players = []
#When the round starts, rename the enable variable and make it global (well.. backwards lol)
def round_start(ev):
global enabled
enabled = 1
#Check if the user disconnected and store in an Array
def player_disconnect(ev):
if enabled:
if ev['reason'] == 'Disconnect by user.':
disc_players.append(ev['es_steamid'])
#Take the STEAM_ID that player died that disconnected
def player_death(ev):
if enabled:
dead_players.append(ev['es_steamid'])
#If the steam id of the player is in the array and he recently disconnected, then SLAY the FUCK out of him! ^_^
def player_spawn(ev):
userid = ev['userid']
if not es.getplayerprop(userid, "CBasePlayer.pl.deadflag"):
steamid = ev['es_steamid']
if steamid in dead_players and steamid in disc_players:
es.setplayerprop(userid, "CBasePlayer.m_iHealth", 0)
es.server.queuecmd('es_xfire %s !self ignite' % userid)
es.msg('#multi', '#green[#lightgreenAnti Retry#green] #lightgreen%s#default has been slayed for rejoining after dying!' % ev['es_username'])
#comments were in there for any editing you guys want to do..
Bookmarks