Raised This Month: $ Target: $400
 0% 

[TF2] Block suicide & Team switches (v1.1.1 - 24/05/2020)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dayornight
Junior Member
Join Date: Jan 2020
Plugin ID:
7124
Plugin Version:
1.1.1
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Block the kill & explode command, and prevent team switches.
    Old 05-23-2020 , 20:36   [TF2] Block suicide & Team switches (v1.1.1 - 24/05/2020)
    Reply With Quote #1

    About
    I wrote this plugin for my Deathrun server, preventing the Activator from killing himself in various ways. Was pretty messy, so I thought I'd rewrite it.

    I think I made it as efficiently as possible, but this is my first plugin so... If you have any recommendations on how to improve my code, definitely share!

    What will this plugin block?
    • Kill
    • Explode
    • Jointeam

    ConVars
    • sm_blockSuicide_enabled (1) - Enable or disable this plugin
    • sm_allowOverride (1) - Allow or disallow overrides for suicides and team switches?
    • sm_blockKillTeam (0) - Which team to block kill for? (0 = No team, 1 = Team RED, 2 = TEAM BLUE, 3 = Both teams)
    • sm_blockExplodeTeam (0) - Which team to block explode for? (0 = No team, 1 = Team RED, 2 = TEAM BLUE, 3 = Both teams)
    • sm_blockSwitchTeam (0) - Which team to block switching teams for? (0 = No team, 1 = Team RED, 2 = TEAM BLUE, 3 = Both teams)
    • sm_allowSpectate (1) - Allow or disallow switching to spectate?
    • sm_allowSpectateTeam (0) - Allow spectate for which team? (0 = Both teams, 1 = Team RED, 2 = Team BLUE)

    Overrides
    • suicideandteamswitch_override

    By default the flag is "b" (admins).

    Compile Requirements
    • Morecolors.inc

    Installation
    - Put the .smx into tf/addons/sourcemod/plugins folder
    - Put the plugin.blocksuicide.cfg in tf/cfg/sourcemod folder
    - Put the blockSuicide.phrases.txt in tf/addons/sourcemod/translations folder
    - Restart your server

    Changelog


    Notes
    You'll have to download the attached .zip file or .smx file, because the web compiler cannot compile due to the <morecolors> include.
    The .inc file has been included into the .zip.
    Attached Files
    File Type: txt blockSuicide.phrases.txt (444 Bytes, 181 views)
    File Type: sp Get Plugin or Get Source (blockSuicide.sp - 224 views - 6.9 KB)
    File Type: smx blockSuicide.smx (10.4 KB, 152 views)
    File Type: cfg plugin.blocksuicide.cfg (2.3 KB, 165 views)
    File Type: zip Block Suicide & Switching.zip (20.6 KB, 183 views)

    Last edited by Dayornight; 05-24-2020 at 17:41.
    Dayornight is offline
    ph
    AlliedModders Donor
    Join Date: Mar 2006
    Old 05-26-2020 , 09:48   Re: [TF2] Block suicide & Team switches (v1.1.1 - 24/05/2020)
    Reply With Quote #2

    Will this plugin interfer with auto team balance?
    __________________
    ph is offline
    Dayornight
    Junior Member
    Join Date: Jan 2020
    Old 05-26-2020 , 14:54   Re: [TF2] Block suicide & Team switches (v1.1.1 - 24/05/2020)
    Reply With Quote #3

    Quote:
    Originally Posted by ph View Post
    Will this plugin interfer with auto team balance?
    I don't think it will interfere. This plugin only listens to the player manually selecting a team to join, auto balance should still function properly.

    If it doesn't work however or breaks something, feel free to post a comment and I'll take a look at it!

    Last edited by Dayornight; 05-26-2020 at 14:55.
    Dayornight is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 15:08.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode