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

[ANY] Simple Discord Link


Post New Thread Reply   
 
Thread Tools Display Modes
Author
XerM
New Member
Join Date: Mar 2021
Location: In a parallel world.
Plugin ID:
7567
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Insurgency (2014)
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A simple plugin for send discord link.
    Old 03-22-2021 , 11:04   [ANY] Simple Discord Link
    Reply With Quote #1

    A simple plugin for send discord link.

    sm_discord / !discord


    Code:
    #include <sourcemod>
    #include <sdktools>
    
    #pragma semicolon 1
    #pragma newdecls required
    
    public Plugin myinfo = 
    {
    	name = "Discord Link",
    	author = "XerM",
    	description = "A simple plugin for discord link",
    	version = "1.0",
    	url = "forums.alliedmods.net"
    };
    
    public void OnPluginStart()
    {
    	RegConsoleCmd("sm_discord", Discord_Link, "Prints discord link to chat");
    }
    
    public Action Discord_Link(int client, int args)
    {
    	if(args > 0)
    	{
    		ReplyToCommand(client, "[SM] Usage: sm_discord");
    		return Plugin_Handled;
    	}
    	
    	ReplyToCommand(client,"\x03yourserverlink");
    	return Plugin_Handled;
    }
    Attached Files
    File Type: sp Get Plugin or Get Source (Discord.sp - 401 views - 622 Bytes)
    File Type: smx Discord.smx (3.9 KB, 113 views)
    __________________
    BLVCK
    XerM is EVERYWHERE!

    Last edited by XerM; 03-22-2021 at 11:09.
    XerM is offline
    ThatKidWhoGames
    Veteran Member
    Join Date: Jun 2013
    Location: IsValidClient()
    Old 03-22-2021 , 14:44   Re: [ANY] Simple Discord Link
    Reply With Quote #2

    Nice plugin! Quick suggestion: the argument amount check is unnecessary, as no arguments need to be supplied anyways.
    ThatKidWhoGames is offline
    XerM
    New Member
    Join Date: Mar 2021
    Location: In a parallel world.
    Old 03-22-2021 , 15:09   Re: [ANY] Simple Discord Link
    Reply With Quote #3

    Quote:
    Originally Posted by ThatKidWhoGames View Post
    Nice plugin! Quick suggestion: the argument amount check is unnecessary, as no arguments need to be supplied anyways.

    Thanks for the suggestion
    __________________
    BLVCK
    XerM is EVERYWHERE!
    XerM is offline
    lors02
    New Member
    Join Date: Mar 2021
    Old 03-24-2021 , 18:03   Re: [ANY] Simple Discord Link
    Reply With Quote #4

    Hey b.

    how do i change the code?

    If i change the "yourserverlink" it dosnt change when im ingame?
    lors02 is offline
    ThatKidWhoGames
    Veteran Member
    Join Date: Jun 2013
    Location: IsValidClient()
    Old 03-24-2021 , 19:43   Re: [ANY] Simple Discord Link
    Reply With Quote #5

    Here is an updated version. Comes with one ConVar:
    Code:
    sm_discord_link - URL to Discord server
    Attached Files
    File Type: sp Get Plugin or Get Source (Discord.sp - 191 views - 803 Bytes)
    ThatKidWhoGames is offline
    Sarrus
    Member
    Join Date: May 2020
    Location: France
    Old 03-28-2021 , 13:30   Re: [ANY] Simple Discord Link
    Reply With Quote #6

    Hey, this already exists : https://github.com/Sarrus1/discord_ad.

    You should add color to the plugin and a Cvar to make it easier/more interresting.
    __________________
    Discord Coding Server | Steam Profile | Community Website | Github Profile

    Taking paid requests (add me on Discord)
    Sarrus 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 12:18.


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