Silent Say Commands

From EventScripts Community Encyclopedia

Contents

Preamble

This rest of this article applies to older Eventscripts versions. Now, you can just use es_regsaycmd to accomplish silent player say commands; simple and easy!


Introduction

If you are running Mani's Admin Plugin with EventScripts, then this could benefit you greatly, depending on what type of scripts you make for your server(s).

In Mani's cfg/mani_admin_plugin/commandlist.txt file, you can specify custom say-able commands that anyone can run. Since Mani intercepts these commands the actual message is not displayed to the chat area on the server.

There are a few things you MUST do for this to work!

  1. Make your say command actually be a es_client_command.cfg entry.
  2. The command you make in the es_client_command.cfg MUST start with a !.
  3. Then in the commandlist.txt file add your entry, so that the said command runs the client console command instead.

This will make it to where when the user says something, they actually run a client console command, and mani hides the said message from being displayed.

Thus this completely removes unnecessary chat spam!

Working Example

Edit the following files accordingly, put the data in them.

FILE: cfg/mani_admin_plugin/commandlist.txt DATA: "testing" C "!testing"

FILE: cfg/eventscripts/es_client_command.cfg DATA: if (event_var(command) equalto "!testing") then es_msg #green "Recieved the testing say command. It Works!"

With this setup (if you made the files properly) any user can say "testing", which will force them to actually run "!testing" on there console, which in turn EventScripts picks it up and tells everyone that it worked.

Bah just use es_regsaycmd

Conclusion

Now you might be thinking why not just have the player run the command on their console? Honestly, I have had to explain how to enable the console and how to use it way too many times, so I decided to find a better way to have player say commands without the spam.

We have accomplished just that! No more spam with player say commands!

blog comments powered by Disqus