Raised This Month: $ Target: $400
 0% 

[L4D1 & L4D2] Zombie limits


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
7623
Plugin Version:
1.7
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    11 
    Plugin Description:
    Limits the number of common zombies & infected bots allowed to spawn simultaneously
    Old 05-01-2021 , 12:29   [L4D1 & L4D2] Zombie limits
    Reply With Quote #1

    Purpose:
    - Prevents server lags / low sv, when map/director decides to spawn too many zombies.
    Description:
    - Plugin instantly kills common zombies / special infected when their total number exceeds the limit specified by you.

    Useful in cases with some (custom) maps where ConVars like "z_common_limit" e.t.c. doesn't help / or get overridden by some functions like this one / VScripts and so.

    Plugin is not intended to limit the number of human-controlled infected in versus.

    Conflicts:
    This plugin does NOT affect any game ConVars, so it must be compatible with any other common/SI limits regulator plugins.

    It counts the quantity manually and manually kills the leftovers over the limit.
    Settings (ConVars):
    Located at cfg/sourcemod/l4d_zombie_limits.cfg
    PHP Code:
    // Enable plugin (1 - On / 0 - Off)
    l4d_zombie_limits_enabled "1"

    // Maximum number of boomers allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_boomer "7"

    // Maximum number of hunters allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_hunter "7"

    // Maximum number of smokers allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_smoker "7"

    // Maximum number of jockey allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_jockey "7"

    // Maximum number of spitters allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_spitter "7"

    // Maximum number of chargers allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_charger "7"

    // Maximum number of tanks allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_tank "10"

    // Maximum number of all special infected allowed on the map simultaneously (tank is not counting), 999 - to disable
    l4d_zombie_limits_si "12"

    // Maximum number of common zombies allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_common "40"

    // Maximum number of witches allowed on the map simultaneously, 999 - to disable
    l4d_zombie_limits_witch "10"

    // Print debug messages? 1 - Yes, 0 - No
    l4d_zombie_limits_print_debug "0" 
    Commands:
    PHP Code:
    // Show the current number of each zombie type
    sm_zcount 
    Compatiblity:
    - L4D1.
    - L4D2.
    Requirements:
    - SourceMod v1.10+
    Related plugins:
    - [L4D1 & L4D2] Multi witches
    - [DEV] Entity Limits Logger
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_zombie_limits.sp - 995 views - 13.3 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 10-01-2022 at 10:26.
    Dragokas is offline
    Kid_Bandes
    Member
    Join Date: May 2010
    Old 05-01-2021 , 13:04   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #2

    Quote:
    Plugin instantly kills common zombies / special infected
    Is this mean spitter will die and leave her spit on the ground or just disappear, Dragokas?
    Kid_Bandes is offline
    jackz
    Junior Member
    Join Date: Oct 2019
    Old 05-01-2021 , 13:10   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #3

    Quote:
    Originally Posted by Kid_Bandes View Post
    Is this mean spitter will die and leave her spit on the ground or just disappear, Dragokas?
    Looking at the code it runs RemoveEntity which I assume shouldn't drop any spit

    Also this plugin is exactly what I need for those crappy custom maps, thanks
    __________________
    jackz is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-01-2021 , 13:31   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #4

    Quote:
    Originally Posted by Kid_Bandes View Post
    Is this mean spitter will die and leave her spit on the ground or just disappear, Dragokas?
    Die within 0.1 sec for safe purposes (and, likely leave her spit). Does it matter? Anyway, it is spawned in safe place.
    Otherwise, particles can infinitely cycle.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 05-01-2021 at 13:33.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-01-2021 , 13:46   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #5

    Ok, I checked, it doesn't produce acid.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 05-01-2021 , 13:56   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #6

    Great job @Dragokas,

    Now I can play some custom maps that have entity/lag/fps problems caused by the number of commons being spawned.

    As a note, I remember that maps that spawn zombies/SI through [(info_zombie_spawn / commentary_zombie_spawner) + logic_timer] entities usually leads to that.
    (Rocket Escape and Helms Deep maps are such examples)
    __________________

    Last edited by Marttt; 05-02-2021 at 13:00.
    Marttt is offline
    Kid_Bandes
    Member
    Join Date: May 2010
    Old 05-01-2021 , 14:45   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #7

    Thanks Dragokas, this is what I need for any custom maps that spawn more than 2 tanks at the same time while using with infected bots plugin

    Edit: One question, is the cvar "l4d_zombie_limits_si" count tank?

    Last edited by Kid_Bandes; 05-01-2021 at 14:58.
    Kid_Bandes is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-02-2021 , 12:23   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #8

    Updated.

    Quote:
    1.1 (02-May-2021)
    - some optimizations.
    - safe check for entity -1 in OnEntityDestroyed
    - added ConVar "l4d_zombie_limits_witch" - Maximum number of witches allowed on the map simultaneously
    For better witch number controlling experience it is recommended to use together with [L4D1 & L4D2] Multi witches, allowing to clear unused witched by distance.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 05-02-2021 at 12:24.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-02-2021 , 12:30   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #9

    Updated.

    Quote:
    1.2 (02-May-2021)
    - Removed tank from counting as special infected, thus not affected by SI Limits.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 05-02-2021 at 12:30.
    Dragokas is offline
    Mi.Cura
    Veteran Member
    Join Date: Dec 2016
    Location: Brazil
    Old 07-23-2021 , 19:32   Re: [L4D1 & L4D2] Zombie limits
    Reply With Quote #10

    Hi, Drakokas, Maybe you can help me

    I have been getting this error:

    L 07/23/2021 - 15:49:54: SourceMod error session started
    L 07/23/2021 - 15:49:54: Info (map "c9m1_alleys") (file "f:\tcafiles\users\scotts1\41067\left4dead2\a ddons\sourcemod\logs\errors_20210723.log")
    L 07/23/2021 - 15:49:54: [SM] Exception reported: Client 1 is not connected
    L 07/23/2021 - 15:49:54: [SM] Blaming: l4d_zombie_limits.smx
    L 07/23/2021 - 15:49:54: [SM] Call stack trace:
    L 07/23/2021 - 15:49:54: [SM] [0] IsFakeClient
    L 07/23/2021 - 15:49:54: [SM] [1] Line 278, /home/forums/content/files/2/8/2/6/6/7/189088.attach::OnClientDisconnect
    __________________
    Mi.Cura | Modded Servers | L4D2
    https://steamcommunity.com/groups/micuramodzombie

    Last edited by Mi.Cura; 07-23-2021 at 19:34.
    Mi.Cura is offline
    Reply


    Thread Tools
    Display Modes

    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 11:33.


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