SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/09/2018, 06:18 PM   #1
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 47
Reputation: 0
Default How To Run Discord Connector ??

Hello hi i got an problem in running discord chatting system in the server i got all information of discord connector i did same thing i create bot i also invite it and i also include bot token in server cfg when i'm trying to open server then its is getting online status but chat is not working what should i do sir
variable
PHP Code:
new DCC_Channel:g_WelcomeChannelId

Onplayertext
PHP Code:
    new name[MAX_PLAYER_NAME 1];
    
GetPlayerName(playeridnamesizeof name);

    
g_WelcomeChannelId DCC_FindChannelByName("discord widget server id"); // Discord channel ID
    
new str1[128];
    
format(str1sizeof str1"[Server] %s: %s"nametext[1]);
    
DCC_SendChannelMessage(g_WelcomeChannelIdstr1); 
Other Code

PHP Code:
public DCC_OnChannelMessage(DCC_Channel:channelDCC_User:author, const message[])
{
    new 
channel_name[100 1];
    if(!
DCC_GetChannelName(channelchannel_name))
    return 
0// invalid channel

    
new user_name[32 1];
    if (!
DCC_GetUserName(authoruser_name))
    return 
0// invalid user

    
new str[145];
    
format(strsizeof str"[Discord/%s] %s: %s"channel_nameuser_namemessage);
    
SendClientMessageToAll(-1str);
    return 
1;

Please Help i'm trying it since 2 weeks thanks in advance
I Have 3 server channels like announcement section chat section and rules section i want to add this system in chat section please
RJTabish is offline   Reply With Quote
Old 27/09/2018, 10:50 PM   #2
AzaMx
Huge Clucker
 
Join Date: Aug 2014
Location: Malaysia
Posts: 332
Reputation: 65
Default Re: How To Run Discord Connector ??

Try make it like this

PHP Code:
    new name[MAX_PLAYER_NAME 1]; 
    
GetPlayerName(playeridnamesizeof name); 
    if (
_:g_WelcomeChannelId == 0//this one missing.
    
g_WelcomeChannelId DCC_FindChannelByName("discord widget server id"); // Discord channel ID 
    
new str1[128]; 
    
format(str1sizeof str1"[Server] %s: %s"nametext[1]); 
    
DCC_SendChannelMessage(g_WelcomeChannelIdstr1); 
AzaMx is offline   Reply With Quote
Old 27/09/2018, 11:11 PM   #3
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 497
Reputation: 35
Default Re: How To Run Discord Connector ??

You need to read plugin's thread more carefully
__________________
My test server: 51.91.122.18:7778
My Discord contact: [SF]kAn3#9933
YT https://www.youtube.com/channel/UCrM...QtP2pczguqvppw
v1k1nG is offline   Reply With Quote
Old 28/09/2018, 07:20 AM   #4
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 47
Reputation: 0
Default Re: How To Run Discord Connector ??

have a look i think this is channel id right ?
Attached Images
File Type: jpg bandicam 2018-09-28 12-18-08-260.jpg (43.3 KB, 51 views)
File Type: jpg bandicam 2018-09-28 12-18-23-927.jpg (125.4 KB, 73 views)
RJTabish is offline   Reply With Quote
Old 28/09/2018, 11:40 AM   #5
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 497
Reputation: 35
Default Re: How To Run Discord Connector ??

Nope to be able to see channel ids you need to enable developer mode in settings
https://discordia.me/developer-mode
__________________
My test server: 51.91.122.18:7778
My Discord contact: [SF]kAn3#9933
YT https://www.youtube.com/channel/UCrM...QtP2pczguqvppw
v1k1nG 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
[FilterScript] Discord Admin Control Panel - Manage players through discord! Exhibit Filterscripts 33 11/08/2020 08:40 AM
[FilterScript] Discord Chat - Real time chatting ( Discord + In Game) Exhibit Filterscripts 36 16/10/2019 08:32 PM
[discord-connector] Get E-mail ID iSpark Scripting Help 2 03/07/2018 12:42 PM
Help with Discord Connector baki Scripting Help 3 25/06/2018 12:03 PM


All times are GMT. The time now is 07:25 AM.


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