AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Cross-Game Chatter v1.6 [Discord <-> AMXX] (https://forums.alliedmods.net/showthread.php?t=319940)

thEsp 11-27-2019 13:32

Cross-Game Chatter v1.6 [Discord <-> AMXX]
 

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
https://i.imgur.com/ktVZ4Jl.png
https://i.imgur.com/S5qIQIZ.png

Discord to game
https://i.imgur.com/ICiY4ld.png
https://i.imgur.com/drHm2f0.png

Bot activity
https://i.imgur.com/2bePNBY.png

Chat history


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.

JocAnis 11-27-2019 15:42

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0b
 
https://forums.alliedmods.net/showthread.php?t=318610

even this which is like multi mode:
https://forums.alliedmods.net/showthread.php?t=319430

?

Sanjay Singh 01-08-2020 11:53

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0b
 
Compiling AmxXDMT... Current time is: 22:17:45.08 - 08-Jan-20

AMX Mod X Compiler 1.10.0.5388
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

H:\AMX\scripting\AmxXDMT.sma(32) : error 017: undefined symbol "GetFileTime"
H:\AMX\scripting\AmxXDMT.sma(36) : error 088: number of arguments does not match definition
H:\AMX\scripting\AmxXDMT.sma(56) : error 017: undefined symbol "fmt"

3 Errors.
Could not locate output file H:\AMX 1.10 5388\scripting\compiled\AmxXDMT.amx (compile failed).
There was an compilation error. Exiting...

Took 0:00:00,11 seconds to run this script.

[Finished in 0.2s]


error?

ZaX 01-08-2020 15:55

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0b
 
Quote:

Originally Posted by Sanjay Singh (Post 2679416)
Compiling AmxXDMT... Current time is: 22:17:45.08 - 08-Jan-20

AMX Mod X Compiler 1.10.0.5388
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

H:\AMX\scripting\AmxXDMT.sma(32) : error 017: undefined symbol "GetFileTime"
H:\AMX\scripting\AmxXDMT.sma(36) : error 088: number of arguments does not match definition
H:\AMX\scripting\AmxXDMT.sma(56) : error 017: undefined symbol "fmt"

3 Errors.
Could not locate output file H:\AMX 1.10 5388\scripting\compiled\AmxXDMT.amx (compile failed).
There was an compilation error. Exiting...

Took 0:00:00,11 seconds to run this script.

[Finished in 0.2s]


error?

Plugin is for AMXX 1.9 but the author didnt mention it

Sanjay Singh 01-09-2020 02:15

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0b
 
make this plugin to work with 1.8.2?

thEsp 02-17-2020 16:27

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0b
 
AmxXDMT has been updated to stable (1.0s) version.

thEsp 03-23-2020 10:02

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0 (Stable)
 
Little fix: this plugin now is supported by stable AMXX (1.8.2).

thEsp 03-27-2020 07:34

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0 (Stable)
 
Thank you.

GBLTeam 03-30-2020 13:51

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0 (Stable)
 
So how to fix this?
Code:

error 017: undefined symbol "socket_is_readable"

thEsp 03-30-2020 14:09

Re: AmxXDMT (Amx Mod X Discord Message Transmitter) v1.0 (Stable)
 
Quote:

Originally Posted by GBLTeam (Post 2689467)
So how to fix this?
Code:

error 017: undefined symbol "socket_is_readable"

Hello. It was my bad.. I completely forgot this function is 1.9-only because it was previously deprecated. I apologize for that. The problem is now fixed, please download "AmxXDMT.sma" again and recompile it.


All times are GMT -4. The time now is 16:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.