Roy 10,832 / 0 Report Post Posted April 16, 2020 Discord On Connect Hey everyone, I just wanted to post a plugin I made this morning quickly. Description A quick plugin I wrote for SourceMod. When a client joins the game, it will open an MOTD window with a Discord invite link or anything else you want. Comes with many features. Supports menus, cookies, and more. ConVars sm_doc_enabled => Enables plugin (Default: 1). sm_doc_title => MOTD window's title. (Default: "Join our Discord server and get free rewards!"). sm_doc_link => Discord invite link. (Default: "https://discord.gg/MnPD6BG"). sm_doc_menu => Show a menu stating to join the server on connect? (Default: 1). sm_doc_notify => Notify the client that we invited them to our Discord server when `sm_doc_menu` is set to 0. (Default: 1). sm_doc_prevent_multiple => Prevent more than one invite per user. (Default: 1). sm_doc_goto => Go to another URL after opening Discord link two seconds later (silently). (Default: 1). sm_doc_goto_url => URL to go to if 'sm_doc_goto' is set to 1. (Default: "https://GFLClan.com/"). sm_doc_hook => Hook to use when presenting menu. 1 = Hook->player_initial_spawn. 2 = OnClientPostAdminCheck. (Default: 2). sm_doc_wait_time => Wait time when using '2' as `sm_doc_hook`. (Default: 10.0). Credits Christian Deacon - @Roy GitHub Link Thanks! Share this post Link to post Share on other sites More sharing options...
Roy 10,832 / 0 Report Post Posted April 16, 2020 As stated in the original post, I made this fairly quickly. This will likely be going on our TF2 and CS:S servers. The code appears to work in CS:S and TF2 based off of the testing I've done in both games. All the features work from what I tested. I'm sure there are ways this code can be improved. With that said, if any GFL Developers want to try to implement join awards to this such as Store credits, that'd be awesome! Though, this would require setting up a Discord bot, setting up a web-backend with a REST API (more than likely), and more. I might try to take on that project in the future, I'm already busy with Anycast development and a lot more. Thanks! Share this post Link to post Share on other sites More sharing options...
Roy 10,832 / 0 Report Post Posted April 16, 2020 I added the GitHub link. My bad for missing that (all over the place at the moment). Thanks! Share this post Link to post Share on other sites More sharing options...
JGuary55 707 / 14,712 Report Post Posted April 16, 2020 · Hidden Hidden I heard this was HTML smh could of asked me to do it cuz im a god at HMTL Share this post Link to post
sh_rky 0 / 330 Report Post Posted April 30, 2020 · Hidden Hidden Please don't add this to the servers its so annoying when I join a community server and it automatically opens discord Share this post Link to post