GLOBALELITE.PL GLOBALELITE.pl 83 Napisano 4 Maja 2017 Share Napisano 4 Maja 2017 Description: This plugin blocks/limits classes for humans! It can run alongside Class Restrictions For Bots that blocks/limits classes for bots Cvars: PHP Code: sm_crh_enabled 1 //(0/1, default 1) Enable/disable restricting classes for humans in TF2. sm_crh_immunity 0 //(0/1, default 0) Enable/disable admins being immune to restricting classes in TF2.sm_crh_flags "b" //(default "b") Admin flags for immunity against restricting classes in TF2. So admins can use limited/blocked classes. //They are still counted towards the limit. If multiple flags are provided, at least one has to be true. Cvar sm_crh_immunity has to be enabled. sm_crh_classmenu 0 //Enables/disables the class menu popping up when you pick the wrong class.sm_crh_sounds 0 //Enables/disables the Nope sound when you pick the wrong class. sm_crh_blu_demomen -1sm_crh_blu_engineers -1sm_crh_blu_heavies -1sm_crh_blu_medics -1sm_crh_blu_pyros -1sm_crh_blu_scouts -1sm_crh_blu_snipers -1sm_crh_blu_soldiers -1sm_crh_blu_spies -1// Limits for Blu human classes in TF2. (-1 for no limit, 0 is disabled, 1 or anything higher will be the limit for that class. Default -1) sm_crh_red_demomen -1sm_crh_red_engineers -1sm_crh_red_heavies -1sm_crh_red_medics -1sm_crh_red_pyros -1sm_crh_red_scouts -1sm_crh_red_snipers -1sm_crh_red_soldiers -1sm_crh_red_spies -1// Limits for Red human classes in TF2. (-1 for no limit, 0 is disabled, 1 or anything higher will be the limit for that class. Default -1) Important info:Plugin limits classes when humans spawn, so if you change limits after they have been spawned then you have to wait until they die or you can slay them (for changes to take effect). REMOVE AN OLDER VERSION OF THIS PLUGIN OR OTHER PLUGINS FOR CLASS RESTRICTION BEFORE INSTALLING THIS PLUGIN! Also, disable the tf2 default classlimit if enabled(the plugin disables this cvar but only once). Autobalance can also cause problems, depending on your settings. Installation: Autogenerates a .cfg file in cfgsourcemod when you load it for the first time. Download the plugin(or the source and compile it yourself) Put the .smx file in tfaddonssourcemodplugins Load the plugin manually/Change the map/Restart the server Changelog: 9.12.2013 - 1.1 - Initial releaseChanges done to the original plugin: - It ignores bots - Autogenerated cfg file in tf/cfg/sourcemod folder - Cvars were renamed to sm_crh_* to be shorter - Check for max humans was added (so if you have more humans than limits, it will change scouts limit to unlimited) - Added game check 10.12.2013 - 1.11 - Removed unnecessary code - Optimized code a bit 21.4.2016 - 1.12 - Changed .wav sounds to .mp3 - Removed the print to all error messages - Logging errors when there are more humans than cvars allow - Added url to this thread 14.06.2016 - 2.00 - Reworked a big part of this plugin - Config file is now called Class_Restrictions_For_Humans - Added flag FCVAR_DONTRECORD for the version cvar so it doesnt appear in the config file - Removed flag FCVAR_PLUGIN - deprecated - Added cvars: sm_crh_text, sm_crh_sounds, sm_crh_classmenu - The plugin will now inform the player that the class is full - Cvar tf_classlimit is now being set to 0 so it doesnt break the plugin - Reworked the functions that check whether there is space for a player - Code optimizations 03.07.2016 - 2.10 - Transitional Syntax - Removed convar change hook for tf_classlimit - Changing m_lifeState when changing classes/teams - Better code readability - Modified version cvar flags 21.07.2016 - 2.11 - Changed handle type for convar handles to ConVar 05.04.2017 - 3.00 - Rewritten the third time - Fixed a bug where players could change to a class that wasnt allowed - The plugin now properly checks the number of players playing that class - Removed sound files from being precached and added to the download table - Code optimization and performance improvements Credits: DJ Tsunami for his team restricting plugin Attached Files Get Plugin or Get Source (ClassRestrictionsForHumans.sp - 12.0 KB) Wyświetl pełny artykuł Odnośnik do odpowiedzi Udostępnij na innych stronach
Rekomendowane odpowiedzi