Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[L4D2] Spitter Dies After Spit (SDAS)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
About

This plugin is based on another plugin, "Spitter Auto Kill" by diorfo,
but I've identified that some things could be improved, so I'm releasing this one.

Goal

The aim of this plugin is to improve the rotation of the special infected (SI), in this case, the Spitter.

This plugin is most useful on versus servers but can be used in cooperative game modes as well,
since most of the time, the Spitter AI is useless until it's spit is reloaded, which takes time.

On servers that have a spawn limit on the number of simultaneous SI,
a player who holds the Spitter for a long time is a disruption because other players cannot spawn as Spitter and move on to the next strategy. (e.g.: Combo => Charger + Spitter).

Some servers the time it takes to reload the spit does not compensate (for balancing reasons),
so it becomes more advantageous to release the Spitter to another person on the same team.

This way the player will not be able to hold the Spitter for a long time after spitting.

Cvars

A configuration file called "l4d2_sdas.cfg" will be automatically created for you upon first run, in "/cfg/sourcemod/" folder.
PHP Code:

// ConVars for plugin "l4d2_sdas.smx"

// How long (in seconds) will Spitter have after spitting before being killed by the plugin? [Default: 10]
// -
// Default: "10.0"
// Minimum: "1.000000"
l4d2_sdas_alive_time "10.0"

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

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

// Enables/Disables a blip sound during the plugin's countdown. 0 = Plugin OFF, 1 = Plugin ON. [Default: 1]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_sdas_countdown_sound "1"

// Players with these flags are invulnerable to the plugin's behavior. Empty = none. [Default: (empty)]
// -
// Default: ""
l4d2_sdas_flags ""

// Turn off the plugin in these game modes, separate by commas (no spaces). Empty = none. [Default: (empty)]
// Known values: coop,realism,versus,survival,scavenge,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. [Default: (empty)]
// Known values: coop,realism,versus,survival,scavenge,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. 0 = All, 1 = Coop, 2 = Survival, 4 = Versus, 8 = Scavenge. Add numbers together. [Default: 0]
// -
// Default: "0"
l4d2_sdas_gamemodes_toggle "0"

// Displays a message to the client during the plugin's countdown (after spit burst event). 0 = OFF, 1 = CHAT, 2 = HINT, 3 = CHAT and HINT [Default: 2]
// -
// Default: "2.0"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_sdas_msgdisplay_countdown "2.0"

// Displays a message to the client when the Spitter dies by the plugin. 0 = OFF, 1 = CHAT, 2 = HINT, 3 = CHAT and HINT [Default: 2]
// -
// Default: "2.0"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_sdas_msgdisplay_death "2.0"

// Displays a message to the client when the Spitter's spit hits the ground. 0 = OFF, 1 = CHAT, 2 = HINT, 3 = CHAT and HINT [Default: 3]
// -
// Default: "3.0"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_sdas_msgdisplay_spitburst "3.0" 

Change Log

Code:

1.0.3 (03-March-2019)
    - Plugin Improvements. (by Mart)
        *Renamed from "Spitter Auto Kill" to "Spitter Dies After Spit (SDAS)".
        *Added L4D2 engine game check.
        *Fixed bug where the client dies after the respawn when is killed before the timer triggers.
        *Fixed bug where the client dies while in ghost mode.
        *Fixed bug where the client dies during scrambles/auto-balance.
        *Fixed bug where the client dies when a map changes.
        *Added countdown and death messages.
        *Added a blip sound on the countdown.
        *Added chat/hint messages by translation file (en/es/pt).
        *Renamed the chat tag to "[SDAS]" and added a hint tag "|SDAS|".
        *Changed the chat's color and highlighted in a different color the number of the countdown.
        *Added more controls through cvars.
            •Enables/disables plugin.
            •Enables/disables plugin on bots.
            •Enables/disables plugin on players by flags.
            •Enables/disables plugin on game modes.
            •Enables/disables blip sound on the countdown.
            •Customizable display message mode (off/chat/hint/both) by event (spit burst/countdown/death).
            •Customizable time that the spitter will be alive after spitting (used by the countdown event).

1.0.2 (20-January-2019)
    - Small changes and fixes. (by Mart)
        *Removed deprecated flag "FCVAR_PLUGIN".
        *Fixed missing parentheses.

1.0.1 (08-May-2017)
    - Fixed Spitter's auto kill through a timer. (thanks to "xines")

1.0.0 (08-May-2017)
    - Initial release. (by diorfo)
    - https://forums.alliedmods.net/showthread.php?p=2635707


Thank you!
  • Silvers - for the clean codes available in the forum, that I used to have some basis, and which helped me a lot to write this plugin.
  • Mr. Zero - for his useful stocks code.
  • xines - for helping to make the first code release work.
  • diorfo - for the first code release.

Installation
  • Put the "l4d2_sdas.smx" file in your server's "/addons/sourcemod/plugins/" folder.
  • Put the "l4d2_sdas_phrases.txt" file in your server's "/addons/sourcemod/translations/" folder.

Note

This is my first time posting a plugin, so maybe my coding has some mistakes, any constructive feedback will be welcome. Including bug report.

Thank you in advance.


Attached Files
File Type: txt l4d2_sdas.phrases.txt (644 Bytes)
File Type: sp Get Plugin or Get Source (l4d2_sdas.sp - 26.1 KB)
File Type: smx l4d2_sdas.smx (10.7 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...