View Single Post
Author Message
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Old 02-23-2013 , 19:03   [CS:GO] NotifyMOTD
Reply With Quote #1

This plugin became obsolete. For admin notification, you better use CallAdmin (https://forums.alliedmods.net/showthread.php?t=213670). If you need chat triggers to display webpages, use Web Shortcuts (https://forums.alliedmods.net/showthread.php?t=244075) instead.

Description
This is a simple plugin for CS:GO that allows displaying MOTD or contacting admin if there is none on the server. It's a re-write of M3Motd plugin made by KaOs. Also, I used a method of displaying MOTD in CS:GO discovered by Mitchell and then hinted by Bacardi. Special thanks to 11530 and ajr1234 for resolving my doubts. This is my first plugin and I am absolutely not a coder, so there may be bugs. (But I hope there aren't any).

INSTALLATION
To configure, you have to do six steps:
1. Modify attached r_rules.html and set title and url to your proper rules website in the line
var popup=window.open("http://yourdomain.com/rules.html","title","height=720,width=1280");
2. Do the step above for r_contact.html too.
3. Place both r_rules.html and r_contact.html on your public http server (it may be Dropbox, but you have to place them in the /Public folder).
4. Go back to your game server and set sm_rules_url to "http://yourdomain.com/r_rules.html" in your cfg/server.cfg (this is the link to the routing r_rules.html site)
5. Do the step above for sm_contact_url "http://yourdomain.com/r_contact.html" in your cfg/server.cfg (this is the link to the routing r_contact.html site).
6. Place notifymotd.smx in your sourcemod/plugins folder and load it.

CVAR's
sm_rules_url - link to the .html file with JavaScript redirecting to proper MOTD file
sm_contact_url - link to the .html file with JavaScript redirecting to your contact site

IN-GAME COMMANDS
!admin - call admin contact site,
!rules - show MOTD,
!sm_rules nick|id (or sm_rules in the console, respectively) - show MOTD to specified target.

CREDITS
Bacardi - fiding a method to display a popup in CS:GO,
KaOs - creating original plugin.

CHANGELOG
0.2 - admin menu integration
0.1.1 - some re-writing as suggested
0.1 - original release

FEATURE REQUESTS
-

SCREENSHOTS
Show rules to myself - https://dl.dropbox.com/u/62939261/csgo/ss1.jpg
Show rules to other player - https://dl.dropbox.com/u/62939261/csgo/ss3.jpg
Contact admin - https://dl.dropbox.com/u/62939261/csgo/ss2.jpg
Attached Files
File Type: zip rules_contact_html.zip (629 Bytes, 4049 views)
File Type: smx notifymotd.smx (7.1 KB, 2289 views)
File Type: sp Get Plugin or Get Source (notifymotd.sp - 6010 views - 7.6 KB)

Last edited by Wilczek; 02-04-2016 at 03:12.
Wilczek is offline