Page 1 of 1

ServerSay

Posted: Mon Nov 22, 2021 7:42 am
by greenie
I searched and I didn't see that this was done before, so I decided to post it.

I'll be honest, it's my first plugin. I had a lot of help from Shuriken (listed in Author) although I did do some of it. Anyway, what it does:

The Purpose:
The purpose of this plugin is fairly simple... its purpose is to relay messages from an in-game admin with ADMIN_CHAT privileges (access i) to the server console, where it will be said as if it was typed into the server console.

Installation:
If you downloaded the .amxx file, copy it to your /mod/addons/amxmodx/plugins/ folder, and add ServerSay.amxx to the bottom of the plugins.ini (/mod/addons/amxmodx/configs/).
If you downloaded the .sma file, compile it in the scripting folder, then follow the directions for an .amxx file.

Usage:
There's not a large and obvious purpose to this plugin... although it seems a message delivered through the server console is noticed more than a regular message. It works for any mod... there's only one command though.
amx_serversay <message>
Will display the message as:
<Server Name> <message>

Example:

amx_serversay Welcome to the server.
Will display to the people in the server as:
<Server Name> Welcome to the server.

Lots of documentation for a tiny plugin.

Stats:
27 lines of code
2 hours of work (learning too, first plugin of mine)
Uses ADMIN_CHAT access.

If you don't like it, sorry. I tried, I just felt I might as well post it.

Update (12/29/2005):
Wow, it got approved! It probably did a while ago, I just never noticed. Anyway, I updated Serversay since it got approved... if the message to the console contains a semi-colon it displays only what is to the left of the semi-colon AND slaps the player for 25 damage.

Update(12/29/2005) (Yes, two in one day):
I just finished enabling the ability to define servername by Cvar (as requested by Hawk552). The cvar is amx_serversay_display, and if it's not EXACTLY 0, it displays the CVAR as the name.

get plugin
get source