View Single Post
Plugin Info:     Modification:          Category:         
thEsp
BANNED
Join Date: Aug 2017
Old 11-27-2019 , 13:32   Cross-Game Chatter v1.6 [Discord <-> AMXX]
Reply With Quote #1


Description
Cross-Game Chatter, or shortly CGC, is a simple extension for GoldSrc-based games that transmits messages between a game and Discord server.

Installation guide
To start with, you need to have a dedicated server with root access.
  1. First of all, create a bot in https://discordapp.com/developers/applications/.
  2. Then install NodeJS (version 12 or higher) in your root server.
  3. Download the needed files and type cd {Discord bot folder}.
  4. Compile and install the AMXX plugin. Make sure you have CC header installed from the link below.
  5. Type npm install [email protected] in order to install needed JS libraries.
  6. Give credentials to your bot, simply edit auth.json & server.js at line #7 & #8.
  7. Move file crossgamechatter.ini to amxmodx/data/lang/ folder.
  8. Finally, start the bot first and restart your game server. Open x_single.x. Alternatively, if you want to make sure that nothing goes wrong and the bot runs continuously (even after an error is shown inside Node), open x_loop.x instead. In this case, 'x' stands for OS or file type (bash, batch).

Commands & cvars
  • amx_cgc_store_messages (cvar, default is: 1) - log incoming messages.
  • amx_cgc_mention_fix (cvar, default is: 1) - warn users if they use "@everyone" tag.
  • amx_cgc_mention_warns (cvar, default is: 3) - maximum number of warnings someone can use "@everyone" tag (and get kicked).
  • say /discord - show Discord chat history.
  • say /discordtheme - toggle Discord theme to dark/light.

Examples (from an older version)
Game to Discord



Discord to game



Bot activity


Chat history
Large image


Download
From GitHub from here.
Cromchat from here.

Translation file
Code:
[al]
THEME_DARK = "&x03[CGC]&x01: Ngjyra juaj e Diskord-it u ndrrua në të &x04errët."
THEME_LIGHT = "&x03[CGC]&x01: Ngjyra juaj e Diskord-it u ndrrua në të &x04qelur."
MENTION_WARN = "&x03[CGC]&x01: Mos e përdor fjalën "@everyone" ose do të &x04përjashtohesh."
MENTION_PUNISH = "[CGC]: U përjashtuat për përdorimin e fjalës "@everyone""

[en]
THEME_DARK = "&x03[CGC]&x01: Your Discord theme has been set to &x04dark."
THEME_LIGHT = "&x03[CGC]&x01: Your Discord theme has been set to &x04light."
MENTION_WARN = "&x03[CGC]&x01: Don't use the word "@everyone" or you will be &x04kicked."
MENTION_PUNISH = "[CGC]: Kicked for using the word "@everyone""

[hu]
THEME_DARK = "&x03[CGC]&x01: A Discord témád mostantól &x04sötét."
THEME_LIGHT = "&x03[CGC]&x01: A Discord témád mostantól &x04világos."
MENTION_WARN = "&x03[CGC]&x01: Ne használd az "@everyone" szót, különben &x04ki leszel rúgva."
MENTION_PUNISH = "[CGC]: Kirúgva az "@everyone" szó használatáért"
Changelog
Code:
v1.0b - Initial (beta) release.
v1.0s - Initial (stable) release + changed 90% of the code.
v1.1 - Fixed some bugs.
v1.2 - Added a chat viewer.
v1.3 - Added support for bot activity.
v1.4 - Added the option to send a message to multiple channels.
v1.5 - Added a punishment system for using "@everyone" tag.
v1.6 - Added the option to select specific channels that can send messages.
Credits
Code:
regener - Hungarian translation
Please support this small project by giving feedback.

Last edited by thEsp; 01-10-2021 at 07:36. Reason: Update.
thEsp is offline