View Single Post
Author Message
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-03-2019 , 20:29   [L4D2] Spitter Dies After Spit (SDAS) [v1.2.1 | 29-April-2021]
Reply With Quote #1

L4D2 ONLY

Description

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

It kills the Spitter some seconds later after spitting.

Features
  • Allow setting how long the spitter lives after spitting.
  • Allow setting immunity based on client flags.
  • Allow setting how the messages should be sent to the client. (chat/hint/instructor)
  • Allow setting a sound for the countdown.

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"

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

// Spitter countdown sound after spit.
// Empty = OFF.
// -
// Default: "buttons/blip1.wav"
l4d2_sdas_countdown_sound "buttons/blip1.wav"

// Display type for the "Dead By Spit" message.
// 0 = OFF, 1 = CHAT, 2 = HINT.
// Add numbers greater than 0 for multiple options.
// Example: "3", displays the message in CHAT and as a HINT.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_sdas_dead_by_spit_msg "3"

// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_sdas_enable "1"

// Players with these flags are immune to the plugin behaviour.
// 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 ""

// Display type for the "Spit Countdown" message.
// 0 = OFF, 1 = CHAT, 2 = HINT, 4 = INSTRUCTOR HINT.
// Add numbers greater than 0 for multiple options.
// Example: "3", displays the message in CHAT and as a HINT.
// -
// Default: "5"
// Minimum: "0.000000"
// Maximum: "7.000000"
l4d2_sdas_spit_countdown_msg "5"

// Display type for the "Spit" message.
// 0 = OFF, 1 = CHAT, 2 = HINT, 4 = INSTRUCTOR HINT.
// Add numbers greater than 0 for multiple options.
// Example: "3", displays the message in CHAT and as a HINT.
// -
// Default: "5"
// Minimum: "0.000000"
// Maximum: "7.000000"
l4d2_sdas_spit_msg "5" 
Admin Commands
  • sm_print_cvars_l4d2_sdas => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Current Translations
  • en - English
  • es - Spanish
  • hu - Hungarian
  • pt - Brazilian Portuguese
  • pt_p - Portuguese
  • ro - Romanian

Notes
  • SDAS stands for Spitter Dies After Spit.
  • Spitter class is only available in L4D2.
  • There is no INSTRUCTOR HINT option for l4d2_sdas_dead_by_spit_msg cvar because Instructor Hints do not display when the client is dead.

To Do
  • Create a configuration to customize the instructor hint stages (stage, color, icon, shake, pulse).

Thank you!

Related Plugins

Post Reply
  • Any feedback, 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.9 KB, 233 views)
File Type: sp Get Plugin or Get Source (l4d2_sdas.sp - 269 views - 24.7 KB)
__________________

Last edited by Marttt; 02-19-2023 at 22:04.
Marttt is online now