- This plugin provides an interface allowing server owners to keep players up to date with recent changes in the server/community. You can think of it as an Announcement feature common on most forums.
- Notice: Requires a SQLite / MySQL database!
- The default configuration is to access a database "sm_notices", so please make the necessary entry into your databases.cfg.
- Displays up to 256 unique Notices via plugin menu, which can be accessed through one of several defined chat commands such as !news and !notices. An example menu has been provided, as descriptions fall short:
- Server Announcements:
- 1) Announcement #1
- 2) Announcement #2
- 3) Recent Rule Changes
- 4) Announcement #4
- Upon selection, the following information is printed to the client's chat:
- Admin (who posted the Notice), Date Posted
[*]Translation support so you don't have to worry about recompiling the source to edit phrases.
[*]Supports both temporary and permanent Notices. Expired Notices are removed from the database on map change, however, they will not display in-game if they've expired prior to being removed.
[*]Supports both global Notices and individual server Notices.
- Global Notices require an index of 0
- Individual Notices require an index equal to that of the server's index cvar.
- sm_notices_enabled: Enables/disables all features of the plugin.
- sm_notices_index: The server index, allowing for server-specific notices.
- sm_notices_commands: The chat triggers available to clients to access notices.
- sm_notices_database: The database to use for the plugin.
- sm_notices_format_time: Determines the formatting for time and date display. Using "" will default to sm_datetime_format (/cfg/sourcemod.cfg)
- sm_notices_advert: The number of seconds after a player joins an initial team for an advert to be sent about the plugin. (0.0 = Disabled)
- sm_listnotices <server : optional>:Prints all Notices to the admin's console; can be constrained to a specific sm_notices_index server.
- sm_delnotice <index>: Deletes a specific Notice from the database.
- sm_getnotice <index>: Prints a specific Notice to the admin's console.
- sm_addnotice <server> <duration : minutes> <"Notice Title"> <"Notice Message">: Adds a new Notice to the database.
- <server>: Can be 0 for all servers using the same database, or a specific sm_notices_index.
- <duration>: Can be 0 for a permanent Notice, otherwise the number of minutes the Notice lasts.
- <"Notice Title"> and <"Notice Message"> MUST be enclosed with quotation marks!
- sm_loadnotices: Re-loads Notices from the database to the specific server; this is done automatically on Map Change, but if changes are made in-game prior to map change, this command must be used to see changes.
- After the plugin is installed, and a functional database connection has been created (i.e. an entry in databases.cfg and a map change / server restart), the plugin is ready for usage. However, without overrides, only ROOT administrators can access the administrative features of the plugin.
- To create a Notice, run sm_addnotice <parameters:see above>. You can confirm the entry of the Notice by running sm_getnotice <index>, where the <index> parameter is printed to you after adding a notice. If you lose the <index>, you can run sm_listnotices and all the necessary information will be printed to your console. If you make a mistake, you'll need to run sm_delnotice <index> and re-create it.Once satisfied, run sm_loadnotices to sync the server with the database.
- The "Admin" responsible for adding a notice is defined by the Admin's Username (you can see this in-game by using sm_who). The default options for Console, and Admins without Usernames, can be configured in the Translations.
Attached Files sm_notices.phrases.txt (2.9 KB) sm_notices.cfg (1.1 KB) sm_notices.smx (17.7 KB) Get Plugin or Get Source (sm_notices.sp - 22.7 KB)
Wyświetl pełny artykuł