Raised This Month: $ Target: $400
 0% 

[REQ] Plugin that shows the discord server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazySkull2k
Member
Join Date: Feb 2017
Old 01-05-2019 , 06:33   [REQ] Plugin that shows the discord server
Reply With Quote #1

Hi I was wondering if anyone has a plugin that simply prints the discord channel in the chat.
Something like:

!discord -> prints the discord link to the chat for everyone to see

Thanks in advance!
CrazySkull2k is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 01-05-2019 , 13:27   Re: [REQ] Plugin that shows the discord server
Reply With Quote #2

Tell me if this is what you want.
You'll need multicolors.inc to compile it yourself.
Also change the line 6 and put your discord server URL

The lines at the end of the code explains what you should do if you want a public message instead a client message one

Tell me if you need more help.


This is what you need to change:

Code:
#define DISCORD_URL "https://discord.gg/mKEkypk"
Also as i said before, look the commented ( // ) lines at the end.
PHP Code:
//The lines below will print the message only for who type !discord [its a client message]

public Action Command_Discord(int clientint args)
{
    
CPrintToChat(client"{green}[DISCORD]{purple} Join in our Discord server!");
    
CPrintToChat(client"{green}[DISCORD]{purple} %s"DISCORD_URL); 
    return 
Plugin_Handled;
}

//The lines below will print the message for EVERYONE. For example if i type !discord, every people in the server will see the printed message 
//Delete the lines above (26, 27, 28, 29, 30, 31) if you want to use the following system
//Also delete the // before the functions

//public Action Command_Discord(int client, int args)
//{
//    CPrintToChatAll("{green}[DISCORD]{purple} Join in our Discord server!");
//    CPrintToChatAll("{green}[DISCORD]{purple} %s", DISCORD_URL); 
//    return Plugin_Handled;
//} 
Attached Files
File Type: sp Get Plugin or Get Source (printdiscord.sp - 44 views - 1.3 KB)
File Type: smx printdiscord.smx (13.2 KB, 35 views)
__________________
NanoC is offline
Send a message via Skype™ to NanoC
CrazySkull2k
Member
Join Date: Feb 2017
Old 01-06-2019 , 03:25   Re: [REQ] Plugin that shows the discord server
Reply With Quote #3

Thank you so much!! Oh my god, this is great, it works like a charm
CrazySkull2k is offline
Reply



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 05:41.


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