SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 08/11/2018, 03:51 PM   #251
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 265
Reputation: 25
Default Re: Discord Connector

Good Job!
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Old 09/11/2018, 07:57 PM   #252
waysemir
Little Clucker
 
Join Date: Oct 2014
Posts: 49
Reputation: 3
Default Re: Discord Connector

Please release the centOS 7 64 bit version.
waysemir is offline   Reply With Quote
Old 18/12/2018, 04:31 AM   #253
Amit1998
Huge Clucker
 
Join Date: Sep 2013
Posts: 246
Reputation: 4
Default Re: Discord Connector

Is this plugin still limited to CentOS 7?
__________________
+REP me if I helped you !
Amit1998 is offline   Reply With Quote
Old 20/12/2018, 08:04 PM   #254
Doddinger
Little Clucker
 
Join Date: Sep 2018
Posts: 37
Reputation: 0
Default Re: Discord Connector

Hey all,

since many people got the problem with libssl.1.0.0.so library in the past I thought about a solution (not only cz you got the problem, I got it also). Here's the solution for debian stretch users:
https://unix.stackexchange.com/quest...ion-of-openssl

It's simple: Simply add the packages key and get the package from debian jessie. I needed a bit until I found a good way how I could avoid it to install all packages of debian jessie. It's been avoided by that little tutorial there.
Thanks god, no thousand needless libraries and tools from debian jessie and no single installation of all dependencies for the package

Doddinger-
Doddinger is offline   Reply With Quote
Old 21/12/2018, 05:28 AM   #255
DeitY
Huge Clucker
 
DeitY's Avatar
 
Join Date: Aug 2012
Location: Serbia
Posts: 320
Reputation: 14
Default Re: Discord Connector

Quote:
Originally Posted by Doddinger View Post
Hey all,

since many people got the problem with libssl.1.0.0.so library in the past I thought about a solution (not only cz you got the problem, I got it also). Here's the solution for debian stretch users:
https://unix.stackexchange.com/quest...ion-of-openssl

It's simple: Simply add the packages key and get the package from debian jessie. I needed a bit until I found a good way how I could avoid it to install all packages of debian jessie. It's been avoided by that little tutorial there.
Thanks god, no thousand needless libraries and tools from debian jessie and no single installation of all dependencies for the package

Doddinger-
For jessie,

sudo dpkg --add-architecture i386;
sudo apt-get update && apt-get upgrade
sudo apt-get install libssl1.0.0:i386

Tried yesterday, solves libssl shit.

Cous it requires 32 bit architecture, if you install only openssl it will give wrong elfclass64.
__________________
Kasno je za oprostaj ; )

DeitY is offline   Reply With Quote
Old 21/12/2018, 02:47 PM   #256
Logic_
High-roller
 
Logic_'s Avatar
 
Join Date: Jun 2015
Location: Pakistan
Posts: 1,548
Reputation: 283
Default Re: Discord Connector

Can we get the functions to modify the channel name (and set user role) anytime soon?
__________________
Cheap game-host (SA-MP, SA-MP Hosted tab, G-MOD etc) @ www.prestigesteve.com
Developer @ Nevada State Prison RP/ CookieDM/ COD:IW; Former developer of COD:BO3, COD:AW, I:RP, PC:RP, NEG, ZL TDM.
  • You can't forcefully correct someone and you shouldn't waste your time on it because you can bring a horse to water but can't force it to drink.
  • Please don't message me asking for help, because by doing that, you're only limiting your support to one person when the whole community can help you here. Refer to scripting help section instead.
Logic_ is offline   Reply With Quote
Old 14/01/2019, 08:01 AM   #257
DavidZvla
Little Clucker
 
DavidZvla's Avatar
 
Join Date: Jul 2017
Location: Cosmos
Posts: 25
Reputation: 1
Default Re: Discord Connector

I have some problem...
When somebody in discord... send a picture from his files,

The callback DCC_OnChannelMessage is called...
and my bot send all messages that i use in my script inmediatly after the image was sended.

if I send a image file...
inmediatly the bot respond with every message in the callback DCC_OnChannelMessage:

here's my script:

PHP Code:
public DCC_OnChannelMessage(DCC_Channel:channelDCC_User:author, const message[])
{
    new 
bool:is_bot;
    if(!
DCC_IsUserBot(authoris_bot)) return 0;
    if(
is_bot) return 0;
    new 
string[150];
    new 
name[25], str[128];
    
DCC_GetUserName(authornamesizeof name);
    
DCC_GetChannelId(channelLastChannelsizeof LastChannel);
    if(
strlen(message) >= || strlen(message) <= 150)
    {
        if(!
strcmp(message"!modson"true7))
        {
            
format(stringsizeof string"``` Admins Online: %i ```"AOnlineCheck());
            
DCC_SendChannelMessage(channelstring);
            return 
1;
        }
        if(!
strcmp(message"!userson"true8))
        {
            
format(stringsizeof string"``` Players Online: %i ```"POnlineCheck());
            
DCC_SendChannelMessage(channelstring);
            return 
1;
        }
        if(!
strcmp(message"!admins"true5))
        {
            
DCC_SendChannelMessage(channel"`Admin Team.`");
            foreach(new 
Player)
            {
                if(
Info[i][pAd] >= 1)
                {
                    if(
Info[i][pAd] == 1){format(stringsizeof(string), "```Moderator: %s```"GetPlayerNameC(i));}
                    else if(
Info[i][pAd] == 2){format(stringsizeof(string), "```Moderator I: %s```"GetPlayerNameC(i));}
                    else if(
Info[i][pAd] == 3){format(stringsizeof(string), "```Global Moderator: %s```"GetPlayerNameC(i));}
                    else if(
Info[i][pAd] == 4){format(stringsizeof(string), "```Operator: %s```"GetPlayerNameC(i));}
                       else if(
Info[i][pAd] == 5){format(stringsizeof(string), "```Admin: %s```"GetPlayerNameC(i));}
                      else if(
Info[i][pAd] == 6){format(stringsizeof(string), "```Genera Adminl: %s```"GetPlayerNameC(i));}
                        else if(
Info[i][pAd] == 7){format(stringsizeof(string), "```Owner: %s```"GetPlayerNameC(i));}
                        
DCC_SendChannelMessage(channelstring);
                }
            }
            return 
1;
        }
        if(!
strcmp(message"!help"true5))
        {
            
format(stringsizeof string"```Bot Cmd's:```");
            
DCC_SendChannelMessage(channelstring);
            
format(stringsizeof string"``!a <text> = Send message to admins In Game.``");
            
DCC_SendChannelMessage(channelstring);
            
format(stringsizeof string"``!modson = Show the number of Admins Online.``");
            
DCC_SendChannelMessage(channelstring);
            
format(stringsizeof string"``!userson = Show the number of users Online.``");
            
DCC_SendChannelMessage(channelstring);
            
format(stringsizeof string"``!admins = Show Rank and Name of Admins Online.``");
            
DCC_SendChannelMessage(channelstring);
            return 
1;
        }
        if((!
strcmp(message"!a"true2)) && ADiscord == 0)
        {
            new 
CanalName[60], fixed[100];
            if(
sscanf(message"s[128]"str))
            {
                
format(stringsizeof string"``USE: !a <text>``");
                
DCC_SendChannelMessage(channelstring);
                return 
1;
            }
            
DCC_GetChannelName(channelCanalNamesizeof CanalName);
            
strmid(fixedstr2sizeof fixed);
            
format(stringsizeof string"[Discord] {FFFFFF}%s: %s"namefixed);
            
SendAdminDiscordMsg(COLOR_GENERAL2string1);
            
format(stringsizeof string"[Discord] {FFFFFF}Canal: %s"CanalName);
            
SendAdminDiscordMsg(COLOR_GENERAL2string1);
            return 
1;
        }
        if((!
strcmp(message"!a"true2)) && ADiscord == 1)
        {
            
format(stringsizeof string"CMD Blocked by Admins..");
            
DCC_SendChannelMessage(channelstring);
            return 
1;
        }
      }
    return 
1;

Fixed: Added before the first CMD... this: (I'm not sure if that's a good solution, but it works for now)

PHP Code:
if(!strcmp(message"!useless"true7)) return 1//Basically an useless CMD 

Last edited by DavidZvla; 16/01/2019 at 02:06 AM.
DavidZvla is offline   Reply With Quote
Old 21/01/2019, 01:30 PM   #258
HNIC
Big Clucker
 
HNIC's Avatar
 
Join Date: Jun 2017
Location: Downtown
Posts: 54
Reputation: 4
Default Re: Discord Connector

Sorry for bugging, but any idea what's wrong? I set everything up like supposed to (added the includes and plugins, edited server.cfg and the script for it), I can compile the script just fine with 0 errors, but when I try to run the server, it tell's me "Run time error 19: "File or function is not found". I've checked the server log, there's nothing wrong there, every single plugin loads. I'm running on Windows 10 right now.

EDIT: It worked well before adding this.
EDIT 2: Got it working, there was a minor conflict in the code.
__________________
- Downtown Roleplay -
Founder & Owner of Downtown Roleplay

Last edited by HNIC; 21/01/2019 at 02:50 PM.
HNIC is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Teamspeak Connector maddinat0r Plugin Development 325 08/09/2018 08:04 PM
Route Connector James_Braga Русский/Russian 9 15/05/2015 09:24 AM
[Map] Connector Gas Tellken Maps 4 01/06/2012 04:04 AM
PSU connector help! patchkinson Everything and Nothing 3 20/03/2010 10:24 PM


All times are GMT. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.