Raised This Month: $32 Target: $400
 8% 

[TF2] Add/Remove Condition Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thecount
Veteran Member
Join Date: Jul 2013
Plugin ID:
4473
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin allows server operators to give either admins or everybody the power to toggle certain designated conditions on themselves.
    Old 01-02-2015 , 13:46   [TF2] Add/Remove Condition Menu
    Reply With Quote #1

    This plugin allows server operators to give either admins or everybody the power to toggle certain designated conditions on themselves. The list of these conditions can be modified in the configuration file. A menu is shown to the player, as in the picture below, with brackets that let the player know if the condition is enabled or not already.


    Commands & ConVars:
    • !cond - Shows condition menu.
    • sm_cond_admin "0/1" - 0 for everyone, 1 for admins only


    INSTALLATION:
    1. Download the AddCond.smx and the tf2_addcond.cfg
    2. Put the .smx file in your addons/sourcemod/plugins/ folder
    3. Place the .cfg file in your addons/sourcemod/configs/ folder
    4. Run the server or "sm plugins load AddCond"

    A list of condition IDs can be found here: TF2Wiki
    Attached Files
    File Type: cfg tf2_addcond.cfg (544 Bytes, 1355 views)
    File Type: sp Get Plugin or Get Source (AddCond.sp - 2583 views - 2.6 KB)

    Last edited by thecount; 01-02-2015 at 15:29.
    thecount is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 01-02-2015 , 13:48   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #2

    uhm, load the keyvalue on plugin start, constantly loading from file everytime a player opens a menu is the worst way to handle this. (even if it seems like the easiest)
    You can also make this an admin command and who ever wants all players to use it they can just use overrides.

    Last edited by Mitchell; 01-02-2015 at 13:49.
    Mitchell is offline
    thecount
    Veteran Member
    Join Date: Jul 2013
    Old 01-02-2015 , 13:50   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #3

    Quote:
    Originally Posted by Mitchell View Post
    uhm, load the keyvalue on plugin start, constantly loading from file everytime a player opens a menu is the worst way to handle this. (even if it seems like the easiest)
    It's not noticeable whatsoever and it allows for admins to change without having to reload the plugin.
    thecount is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 01-02-2015 , 14:24   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #4

    Quote:
    Originally Posted by thecount View Post
    It's not noticeable whatsoever and it allows for admins to change without having to reload the plugin.
    Usually the admins don't have FTP access to change the config, and that owner can just reload the plugin. Also it's not a config that would need to be changed a ton of times before using it.. If the file gets big enough you will see spikes, etc. It's good practice to make stable code.
    Mitchell is offline
    thecount
    Veteran Member
    Join Date: Jul 2013
    Old 01-02-2015 , 14:45   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #5

    Quote:
    Originally Posted by Mitchell View Post
    Usually the admins don't have FTP access to change the config, and that owner can just reload the plugin. Also it's not a config that would need to be changed a ton of times before using it.. If the file gets big enough you will see spikes, etc. It's good practice to make stable code.
    I understand the point you're trying to make. Yet I'm keeping it this way.
    thecount is offline
    deadmau54
    AlliedModders Donor
    Join Date: May 2013
    Old 01-02-2015 , 14:15   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #6

    Awesome, works great, thanks.
    __________________
    deadmau54 is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 01-02-2015 , 15:42   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #7

    There are so many plugins where people just open files and close them on demand, rather than caching the values.

    Keyvalues arn't great, and files are really bad to use while the game is running. The exception would be the VPK files, since they usually get cached in memory (memory mapped files). Kv performance is also generally bad, so it's much better to just dump what you need to an ADT array and use that.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 01-03-2015 , 22:12   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #8

    Funnily enough I am actually working on a version of this, but coded in the same way that FunCommands/FunCommandsX is coded. And my version isn't just conditions. Been working on it on and off for the past year.

    This is pretty barebones when it comes to conditions as there are close to a hundred different conditions to choose from.

    Very nice nonetheless.
    404UserNotFound is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 01-04-2015 , 00:59   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #9

    Wow! I really like the concept of this plugin. I added a few MannPower Powerup conditions to the configuration file.

    Unfortunately, whenever I try to use the plugin while in game it crashes the server. Am I doing something wrong, or is this plugin not designed to work with some of the new conditions? It seems to work briefly before the server crash, even when multiple conditions are applied.

    Here is the contents of my tf2_addcond.cfg file:
    Code:
    "Conditions"
    {
     "Mini-Crits"
     {
      "condID"   "19"
      "name"  "Mini-Crits"
     }
     "Jarate"
     {
      "condID"   "24"
      "name"  "Jarate"
     }
     "Disciplinary Action"
     {
      "condID"   "32"
      "name"  "Speed Boost"
     }
     "Ubercharged"
     {
      "condID"   "5"
      "name"  "Ubercharge"
     }
     "Minify Magic Spell"
     {
      "condID"   "72"
      "name"  "Rushed"
     }
     "Ghost"
     {
      "condID"   "77"
      "name"  "Ghost"
     }
     "Big Head"
     {
      "condID"   "84"
      "name"  "Big Head"
     }
     "Fire Immunity"
     {
      "condID"   "69"
      "name"  "Fire Immunity"
     }
     "Swim in Air"
     {
      "condID"   "86"
      "name"  "Swim in Air"
     }
     "MannPower Strength"
     {
      "condID"   "90"
      "name"  "MannPower Strength"
     }
     "MannPower Haste"
     {
      "condID"   "91"
      "name"  "MannPower Haste"
     }
     "MannPower Regen"
     {
      "condID"   "92"
      "name"  "MannPower Regen"
     }
     "MannPower Resistance"
     {
      "condID"   "93"
      "name"  "MannPower Resistance"
     }
     "MannPower Vampire"
     {
      "condID"   "94"
      "name"  "MannPower Vampire"
     }
     "MannPower Warlock"
     {
      "condID"   "95"
      "name"  "MannPower Warlock"
     }
     "MannPower Precision"
     {
      "condID"   "96"
      "name"  "MannPower Precision"
     }
     "MannPower Agility"
     {
      "condID"   "97"
      "name"  "MannPower Agility"
     }
    }
    PC Gamer is offline
    Hippo_
    New Member
    Join Date: Jan 2015
    Old 01-07-2015 , 14:20   Re: [TF2] Add/Remove Condition Menu
    Reply With Quote #10

    I can't give you error logs as it doesn't really show anything, but whenever I have this plugin loaded, my server would crash after five or ten minutes. Are you aware of this being an issue?
    Hippo_ 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 09:08.


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