Raised This Month: $119 Target: $400
 29% 

[L4D2] Spitter Dies After Spit (SDAS) [v1.1.6 | 13-July-2019]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Senior Member
Join Date: Jan 2019
Plugin ID:
6457
Plugin Version:
1.1.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Creates a timer that triggers when the Spitter spits. At the end of the countdown, if the Spitter is alive, it will be killed.
    Old 03-03-2019 , 20:29   [L4D2] Spitter Dies After Spit (SDAS) [v1.1.6 | 13-July-2019]
    Reply With Quote #1

    About

    This plugin is based on Spitter Auto Kill by diorfo, with some improvements.

    Description

    This plugin will improve the Spitter turnover.
    On versus games, a player who holds the Spitter for a long time prevents other players to spawn as Spitter (when there is no slot available).
    With this plugin, the player will not be able to hold the Spitter for a long time after spitting.

    For coop games, the plugin will only kill the Spitter after some time when it spits.

    Preview



    Cvars

    A configuration file named "l4d2_sdas.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // How long (in seconds) will Spitter have after spitting before being killed by the plugin.
    // -
    // Default: "10"
    // Minimum: "1.000000"
    l4d2_sdas_alive_time "10"

    // Alternative display mode for the chat, in case the client has the chat HUD hidden.
    // Known values: 0 = OFF, 2 = HINT, 4 = CENTER, 8 = CONSOLE, 16 = INSTRUCTOR.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "16"
    // Minimum: "0.000000"
    // Maximum: "30.000000"
    l4d2_sdas_altdisplay_hiddenchathud "16"

    // Alternative display mode for the hint, in case the client has the hint HUD hidden.
    // Known values: 0 = OFF, 1 = CHAT, 4 = CENTER, 8 = CONSOLE, 16 = INSTRUCTOR.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "4"
    // Minimum: "0.000000"
    // Maximum: "29.000000"
    l4d2_sdas_altdisplay_hiddenhinthud "4"

    // Alternative display mode for the instructor hint (L4D2 only), in case the client has it disabled or applied it to the Spitter's death (3rd event).
    // Known values: 0 = OFF, 1 = CHAT, 2 = HINT, 4 = CENTER, 8 = CONSOLE.
    // Add numbers greater than 0 for multiple
    // -
    // Default: "2"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d2_sdas_altdisplay_instructorhintdisabled "2"

    // Enables/Disables the plugin behavior on Spitter bots. 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_sdas_bots "1"

    // Enables/Disables the plugin. 0 = Plugin OFF, 1 = Plugin ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_sdas_enabled "1"

    // Players with these flags are immune to the plugin behavior. Empty = none.
    // Known values at "\addons\sourcemod\configs\admin_levels.cfg".
    // Example: "az", will apply immunity to players with "a" (reservation) or "z" (root) flag.
    // -
    // Default: ""
    l4d2_sdas_flags ""

    // Turn off the plugin in these game modes, separate by commas (no spaces). Empty = none.
    // Known values: coop,realism,versus,survival,scavenge,teamversus,teamscavenge,
    // mutation[1-20],community[1-6],gunbrain,l4d1coop,l4d1vs,holdout,dash,shootzones.
    // -
    // Default: ""
    l4d2_sdas_gamemodes_off ""

    // Turn on the plugin in these game modes, separate by commas (no spaces). Empty = all.
    // Known values: coop,realism,versus,survival,scavenge,teamversus,teamscavenge,
    // mutation[1-20],community[1-6],gunbrain,l4d1coop,l4d1vs,holdout,dash,shootzones.
    // -
    // Default: ""
    l4d2_sdas_gamemodes_on ""

    // Turn on the plugin in these game modes.
    // Known values: 0 = all, 1 = coop, 2 = survival, 4 = versus, 8 = scavenge.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for "coop" (1) and "survival" (2).
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d2_sdas_gamemodes_toggle "0"

    // Displays a message to the client when the Spitter dies by the plugin (3rd event).
    // Known values: 0 = OFF, 1 = CHAT, 2 = HINT, 4 = CENTER, 8 = CONSOLE.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", displays as "CHAT" (1) and "HINT" (2).
    // -
    // Default: "10"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d2_sdas_msgdisplay_death "10"

    // Displays a message to the client when the Spitter spits (1st event).
    // Known values: 0 = OFF, 1 = CHAT, 2 = HINT, 4 = CENTER, 8 = CONSOLE, 16 = INSTRUCTOR.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "17"
    // Minimum: "0.000000"
    // Maximum: "31.000000"
    l4d2_sdas_msgdisplay_spit "17"

    // Displays a message to the client during the spit countdown (2nd event).
    // Known values: 0 = OFF, 1 = CHAT, 2 = HINT, 4 = CENTER, 8 = CONSOLE, 16 = INSTRUCTOR.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "24"
    // Minimum: "0.000000"
    // Maximum: "31.000000"
    l4d2_sdas_msgdisplay_spitcountdown "24"

    // Enables/Disables a sound during the spit countdown. 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_sdas_spitcountdown_sound "1"

    // Sound file name relative to the "sound" folder that plays during the spit countdown. Empty = default.
    // -
    // Default: "buttons/blip1.wav"
    l4d2_sdas_spitcountdown_soundpath "buttons/blip1.wav"

    // Adds the plugin tag to the displayed messages.
    // Known values: 0 = OFF, 1 = CHAT, 2 = HINT, 4 = CENTER, 8 = CONSOLE, 16 = INSTRUCTOR.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "31.000000"
    l4d2_sdas_tagdisplay "0" 
    Admin Commands

    PHP Code:
    sm_l4d2_sdas_print_cvars // Prints the plugin related cvars and their respective values to the console. (needs "z" flag). 
    Change Log

    Spoiler


    Current Translations
    • en - English
    • es - Spanish
    • pt - Brazilian Portuguese

    Notes
    • SDAS stands for Spitter Dies After Spit.
    • Spitter class is only available in L4D2.
    • There is no INSTRUCTOR value for l4d2_sdas_msgdisplay_death cvar because Instructor Hints do not display when the client is dead.
    • HINT mode blinks when the HUD is hidden with the HIDEHUD_ALL (4) or HIDEHUD_MISCSTATUS (64) flag.

    To Do
    • Create a configuration to customize the instructor hint stages (stage, color, icon, shake, pulse).
    • Display message to other players.
    • Allow players to turn off the beep sound.

    Thank you!

    Related Plugins

    Post Reply
    • Any feedbacks, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d2_sdas_phrases.txt" file in your "\addons\sourcemod\translations\" folder.
    • Put the "l4d2_sdas.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: txt l4d2_sdas.phrases.txt (2.8 KB, 63 views)
    File Type: sp Get Plugin or Get Source (l4d2_sdas.sp - 72 views - 58.3 KB)
    __________________

    Last edited by Marttt; 07-13-2019 at 19:44. Reason: v1.1.6
    Marttt is offline
    Crasher_3637
    AlliedModders Donor
    Join Date: May 2012
    Location: average villain lair
    Old 03-04-2019 , 17:24   Re: [L4D2] Spitter Dies After Spit (SDAS) [v1.0.4 | 04-March-2019]
    Reply With Quote #2

    I disagree with the use of a cvar to determine immunity flags. Please consider using CheckCommandAccess(). You can use an arbitrary command as an override.

    Example:

    PHP Code:
    CheckCommandAccess(client"sdas_override"ADMFLAG_SLAYfalse); 
    Usage:

    PHP Code:
    Overrides
    {
            
    "sdas_override"        "abcdefz"

    __________________
    AFK like JFK
    Crasher_3637 is offline
    Marttt
    Senior Member
    Join Date: Jan 2019
    Old 03-06-2019 , 09:00   Re: [L4D2] Spitter Dies After Spit (SDAS) [v1.0.6 | 06-March-2019]
    Reply With Quote #3

    Crasher_3637, thanks for the feedback.

    I fixed the immunity flag in v1.0.6, now it will be read correctly through the cvar.
    __________________

    Last edited by Marttt; 03-31-2019 at 19:06.
    Marttt 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 04:37.


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