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

RSS[ANY] Chat Trigger to Lower Case


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

This plugin converts chat text to lower case when it starts with a chat trigger. ("!" or "/" )

It is very useful for me, as I often make mistakes while typing a chat command, adding spaces or some uppercase letters, causing the command to not be recognized.

I did this plugin a long time ago, but during this time a similar one was released [ANY] !COMMAND eater by Dragokas,
which helped me a lot to improve the coding and I highly recommend using it if you have more specific needs.

This plugin was made for L4D1 and L4D2 but may work in other games as well.

Features
  • Allow trimming the text when it starts with a chat trigger.
  • Read chat triggers directly from sourcemod core config. (sourcemod/configs/core.cfg => PublicChatTrigger and SilentChatTrigger)

Chat message examples
  • "!slay @ALL" converts into "!slay @all"
  • " !Kick @Bots" converts into "!kick @bots"
  • "!NOCLIP Mart" converts into "!noclip mart"

Cvars

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

PHP Code:

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

// Trim (remove whitespaces) the text when it starts with a chat trigger.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
chat_trigger_lowercase_trim "1" 

Admin Commands
  • sm_print_cvars_chat_trigger_lowercase => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Notes
  • The chat triggers config is located at sourcemod/configs/core.cfg. Check the PublicChatTrigger and SilentChatTrigger attributes.
  • The chat text is limited to 127 characters.
  • It only lower case chat commands, console commands won't have the same behavior.

Thank you!

Related Plugins

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

Installation
  • Put the "chat_trigger_lowercase.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.

Attached Files
File Type: sp Get Plugin or Get Source (chat_trigger_lowercase.sp - 8.7 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

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

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