Raised This Month: $32 Target: $400
 8% 

AMXX Chat Relay [Discord <=> Ingame]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
endnch
Junior Member
Join Date: Sep 2019
Old 09-09-2019 , 17:21   AMXX Chat Relay [Discord <=> Ingame]
Reply With Quote #1

AMXX client for the Discord bot in this plugin:
https://forums.alliedmods.net/showthread.php?t=311079

Introduction

Communicate between Discord & In-Game, monitor server without being in-game, control the flow of messages and user base engagement!

Features

- Recieve and send messages bidrectionally
- Channel configuration for powerful setups
- Setup is incrediblily easy with Discord bot commands and simple config files
- Upon disconnect, game servers will attempt to reconnect at a fixed interval

Prerequisites

- AMX Mod X 1.10 (tested on build 5378)
- Server to host the relay binary on (with MySQL if not external)
- A Discord bot token (https://discordapp.com/developers/applications/)
- Discord Bot v2.0.0 (https://github.com/rumblefrog/source...relay/releases)

Bot Installation

https://rumblefrog.me/source-chat-relay/setup

Plugin Installation

- Copy the plugin to your plugins folder
- Add the plugin filename to your configs/plugins.ini file
- Copy the config file to you configs/plugins folder
- Edit the config file
- Change map to load the plugin
- You should get a "[AMXX-Server-Relay] Successfully authenticated" message if you did everything correctly
Attached Files
File Type: cfg AMX-Server-Relay.cfg (995 Bytes, 972 views)
File Type: sma Get Plugin or Get Source (1.8-Compatible-AMXX-Server-Relay.sma - 1250 views - 9.8 KB)
File Type: sma Get Plugin or Get Source (AMXX-Server-Relay.sma - 1204 views - 10.5 KB)

Last edited by endnch; 09-12-2019 at 10:20.
endnch is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-09-2019 , 21:28   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #2

Finally something really new and interesting in "New Plugin Submissions"

I successfully did a connection so amxx will trigger a discord bot to write something in the specific channel, but could do opposite, to read command and react on them...how it seems your work is doing right that

Can you exaplain in detail what does this mean?

Server to host the relay binary on (with MySQL if not external)
(mysql is must-need?)

Also why amxmodx 1.10 ...
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
endnch
Junior Member
Join Date: Sep 2019
Old 09-09-2019 , 21:48   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #3

Quote:
Originally Posted by JocAnis View Post
Finally something really new and interesting in "New Plugin Submissions"

Can you exaplain in detail what does this mean?

Server to host the relay binary on (with MySQL if not external)
(mysql is must-need?)

Also why amxmodx 1.10 ... :D
You need to run the Bot software so the game server can communicate with your Discord server. You can run the software on your computer, or you can run it on a server so it stays online 24/7. The software requires a MySQL database to store information about the clients that connect to it and the channels in your discord server. You can run this database in the same computer/server as the software or you can run it externally in another server.

I put 1.10 because that's the version I tested it on, in the code I use some functions that were introduced in 1.9 so technically it should work in 1.9 too, but I haven't tested it.

Last edited by endnch; 09-09-2019 at 21:53.
endnch is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-10-2019 , 06:07   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #4

Very Nice plugin.
One thing there is 1.8.2 is latest version of amxmodx i have seen in amxmodx.org so u should make this plugin work on 1.8.2.
BTW its very nice plugin.
__________________
Facebook
My YouTube
Ro{Y}aL WarLanD CommuniTy
Selling Zombie CSO 4.3 Money System Mod
DON KHAN 1 is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 09-10-2019 , 06:28   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #5

Don't use blocking socket for every chat message.
Do you know about curl or grip?
Mistrick is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-10-2019 , 07:25   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #6

Quote:
Originally Posted by DON KHAN 1 View Post
Very Nice plugin.
One thing there is 1.8.2 is latest version of amxmodx i have seen in amxmodx.org so u should make this plugin work on 1.8.2.
BTW its very nice plugin.
It's 2019, start using new stuff. 1.8.2 will soon be an unsupported version, so there's no point in doing that - simply not worth it. Discord didn't even exist when that version came out.
------------------------------------------------------
Word of advice - maybe a better name for the plugin will be "AMXX Chat Relay". AMX is a very old and no longer supported version of AMXX.

PS: you don't need to include "amxconst" and "cvars" manually - they are already included in "amxmodx".
__________________

Last edited by OciXCrom; 09-10-2019 at 07:25.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-10-2019 , 07:32   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
It's 2019, start using new stuff. 1.8.2 will soon be an unsupported version, so there's no point in doing that - simply not worth it. Discord didn't even exist when that version came out.
------------------------------------------------------
Word of advice - maybe a better name for the plugin will be "AMXX Chat Relay". AMX is a very old and no longer supported version of AMXX.

PS: you don't need to include "amxconst" and "cvars" manually - they are already included in "amxmodx".
"Soon"
__________________
HamletEagle is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-10-2019 , 08:21   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #8

was looking randomly to code , and saw these :
Code:
new sKillerName[MAX_NAME_LENGTH]; get_user_name(killer, sKillerName, MAX_NAME_LENGTH); new sVictimName[MAX_NAME_LENGTH]; get_user_name(victim, sVictimName, MAX_NAME_LENGTH); new sWpnName[MAX_NAME_LENGTH]; xmod_get_wpnname(wpnindex, sWpnName, MAX_NAME_LENGTH);
why not using charsmax(sKillerName) , charsmax(sVictimName) , charsmax(sWpnName) ?
Code:
format(sMessage, MAX_COMMAND_LENGTH, "\*\*\* %s killed %s with a headshot from %s \*\*\*", sKillerName, sVictimName, sWpnName); } else { format(sMessage, MAX_COMMAND_LENGTH, "%s killed %s with %s", sKillerName, sVictimName, sWpnName);
why not formatex() ?
LearninG is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-10-2019 , 09:07   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #9

Why not?

PHP Code:
 formatex(sMessageMAX_COMMAND_LENGTH"\*\*\* %n killed %n with a headshot from %s \*\*\*"killervictimsWpnName);
}
else
{
formatex(sMessageMAX_COMMAND_LENGTH"%n killed %n with %s"killervictimsWpnName); 
Since it is for using the functions of amx 1.9 + ...
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
endnch
Junior Member
Join Date: Sep 2019
Old 09-10-2019 , 11:57   Re: AMX Chat Relay [Discord <=> Ingame]
Reply With Quote #10

Quote:
Originally Posted by DON KHAN 1 View Post
Very Nice plugin.
One thing there is 1.8.2 is latest version of amxmodx i have seen in amxmodx.org so u should make this plugin work on 1.8.2.
BTW its very nice plugin.
I actually started developing it in 1.8 but when I got to creating the cvars I said "screw this" and switched to 1.10. Anyhow I added a 1.8 compatible version, it has no cvars so to configure it you have to modify the source and compile the plugin yourself. Also the messages coming from discord won't have any color.

Quote:
Originally Posted by OciXCrom View Post
Word of advice - maybe a better name for the plugin will be "AMXX Chat Relay". AMX is a very old and no longer supported version of AMXX.

PS: you don't need to include "amxconst" and "cvars" manually - they are already included in "amxmodx".
Changed the plugin name and removed the includes.

Quote:
Originally Posted by LearninG View Post
why not using charsmax(sKillerName) , charsmax(sVictimName) , charsmax(sWpnName) ?
I fixed that, thanks.

Quote:
Originally Posted by LearninG View Post
why not formatex() ?
Quote:
Originally Posted by iceeedr View Post
Why not?
Since it is for using the functions of amx 1.9 + ...
Is formatex really that much faster than format? I changed it anyways.

Last edited by endnch; 09-10-2019 at 12:12.
endnch is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:55.


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