Raised This Month: $12 Target: $400
 3% 

[Gold Discord] Core


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
JDW
Junior Member
Join Date: Jul 2020
Old 07-04-2020 , 17:36   [Gold Discord] Core
Reply With Quote #1

[Description]
A simple library for working with webhooks discord on amxmodx

[Example]

PHP Code:
#include <amxmodx>
#include <discord>

#pragma semicolon 1

static const webHook[] = "example";

public 
plugin_init()
{
    
register_plugin("[Discord] Example""1.0""JDW");

    
register_clcmd("say /example""ExampleCommand");
}

public 
ExampleCommand(id)
{
    if (
Discord_StartMessage())
    {
        
Discord_SetStringParam(USERNAME"JDW");
        
Discord_SetStringParam(CONTENT"Hello, world");
        
Discord_AddField("Field""Test");
        
Discord_SendMessage(webHook);
    }

    return 
PLUGIN_HANDLED;

In configs/discord.cfg

"example" "your webhook"

[Requirements]
Amx mod X 1.9+
https://forums.alliedmods.net/showthread.php?t=315567

[Version]
1.0 - Released

[Modules]
https://github.com/JDW1337/Gold-Disc...dules/session/ - Duration of the administrator session.


Source : https://github.com/JDW1337/Gold-Discord
Attached Files
File Type: zip Discord.zip (6.9 KB, 400 views)

Last edited by JDW; 07-04-2020 at 17:37.
JDW is offline
fum77
Junior Member
Join Date: May 2020
Location: Bournemouth (UK)
Old 07-13-2020 , 06:25   Re: [Gold Discord] Core
Reply With Quote #2

Hi JDW. I just tried to install you plugin to my server.
First of all the .sma you upload are not compilable. I tried to compile it with 1.9 amxmodx version.
Screen Shot of the error
I also installed the required module from Grip Module
After this I just try the cod you have on Github Discord_Session.sma
This is compiling well but I got this error on the server console:
Load fails: Plugin uses an unknown function (name "Discord_SendMessage") - check your modules.ini.
I also add discord line on my modules.ini and the discord.inc on the scripting/include of my server.
Can you pls help me get this plugin working?
Thanks mate!

Last edited by fum77; 07-13-2020 at 08:56.
fum77 is offline
Send a message via Skype™ to fum77
JDW
Junior Member
Join Date: Jul 2020
Old 07-15-2020 , 20:08   Re: [Gold Discord] Core
Reply With Quote #3

Quote:
Originally Posted by fum77 View Post
Hi JDW. I just tried to install you plugin to my server.
First of all the .sma you upload are not compilable. I tried to compile it with 1.9 amxmodx version.
Screen Shot of the error
I also installed the required module from Grip Module
After this I just try the cod you have on Github Discord_Session.sma
This is compiling well but I got this error on the server console:
Load fails: Plugin uses an unknown function (name "Discord_SendMessage") - check your modules.ini.
I also add discord line on my modules.ini and the discord.inc on the scripting/include of my server.
Can you pls help me get this plugin working?
Thanks mate!
According to the screen, nothing is clear .-.
Here are the compiled sources for 1.9 amx

Last edited by HamletEagle; 07-16-2020 at 12:57. Reason: Don't attach amxx files
JDW is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-16-2020 , 12:58   Re: [Gold Discord] Core
Reply With Quote #4

Please do not add compiled plugins, this is against the rules.
__________________
HamletEagle is offline
PyPKjE20
Member
Join Date: Dec 2010
Location: Lithuania
Old 07-23-2020 , 16:28   Re: [Gold Discord] Core
Reply With Quote #5

Good job!

insert
#define PLATFORM_MAX_PATH 256
#include <textparse_smc>


but I have compile plugin problem
Quote:
//// Discord.sma
//
// C:\Users\PyPKjE\Desktop\SCRIPTINGAS\scripting asRPG\Discord.sma(60) : error 088: number of arguments does not match definition
// C:\Users\PyPKjE\Desktop\SCRIPTINGAS\scripting asRPG\Discord.sma(339) : error 017: undefined symbol "RequestFrame"
//
// 2 Errors.
// Could not locate output file compiled\Discord.amx (compile failed).
//
// Compilation Time: 0.12 sec
__________________

CS:GO Open Chest MOD IP: csgo.slimi.lt
New CS 1.6 CSGO IP: pub.slimi.lt
CS 1.6 Slimi RPG MOD http://rpg.slimi.lt

Last edited by PyPKjE20; 07-23-2020 at 17:27. Reason: Fixed
PyPKjE20 is offline
Send a message via Skype™ to PyPKjE20
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 21:13.


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