local snr_ban = true -- true means they will be banned if they leave after being set to be slain the next round. false means they won't be banned.local snr_bantime = 60 -- Time, in minutes, how long to ban someone for if they leave after being set to slay next round. 0 = permanent. local snr_logcmd = true -- If set to true, when an admin uses this command, it will be logged. false means it won't be. local function SlayNextRoundNotify( bool, admin, victim ) if bool == nil or not admin:IsValid() or not victim:IsValid() then MsgN( "Something fucked up." ) return end if bool then admin:ChatPrint( victim:Nick().." will be slain the following round." ) victim:ChatPrint( "You will be slain the following round; this was done by "..admin:Nick() ) if snr_logcmd then ServerLog( admin:Nick().." set "..victim:Nick().." to be slain the following round." ) end else admin:ChatPrint( victim:Nick().." will no longer be slain the following round." ) victim:ChatPrint( "You will no longer be slain the following round; this was done by "..admin:Nick() ) if snr_logcmd then ServerLog( admin:Nick().." set "..victim:Nick().." to no longer be slain the following round." ) end end end concommand.Add( "slaynextround", function( ply, cmd, args ) if not ply:IsSuperAdmin() then ply:ChatPrint( "You do not have access to this command." ) return end local playr = args[1] if not playr then ply:ChatPrint( "Use: !snr ; slaynextround " ) return end local user = nil for _, v in pairs( player.GetAll() ) do if string.find( string.lower( v:Nick() ), string.lower( playr ) ) then user = v break end end if not user then ply:ChatPrint( "User \""..playr.."\" not found." ) return end if ply:IsSuperAdmin() and user:IsSuperAdmin() then ply:ChatPrint( "You can not slay other super admins." ) return end local pdat = user._SNR if pdat then if pdat == 1 then user._SNR = 0 SlayNextRoundNotify( false, ply, user ) else user._SNR = 1 SlayNextRoundNotify( true, ply, user ) end else user._SNR = 1 SlayNextRoundNotify( true, ply, user ) end end ) hook.Add( "TTTBeginRound", "Next Round Slay", function() for _, v in pairs( player.GetAll() ) do if v._SNR and v._SNR == 1 then v:Kill() v._SNR = 0 end end end ) hook.Add( "PlayerSay", "Next Round Slay Chat Command", function( ply, text ) if ( string.sub( text, 1, 4 ) == "!snr" or string.sub( text, 1, 14 ) == "!slaynextround" ) then text = string.Explode( text, " " ) ply:ConCommand( "slaynextround "..text[2] ) return "" end end ) hook.Add( "PlayerDisconnected", "Ban if avoiding slay", function( ply ) if ply._SNR and ply._SNR == 1 and snr_ban then ply:Ban( snr_bantime, "Avoiding punishment" ) -- Personal opinion: I find this a bit stupid. If they leave, they won't play the next round. If they're slain, they won't play the next round. What's wrong about them having control over the action? end end )