Raised This Month: $168 Target: $400
 42% 

[CS:GO] NotifyMOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Plugin ID:
3545
Plugin Version:
0.1.1
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Simple plugin for CS:GO that allows displaying MOTD or contacting admin if there is none on the server.
    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, 3087 views)
    File Type: smx notifymotd.smx (7.1 KB, 1429 views)
    File Type: sp Get Plugin or Get Source (notifymotd.sp - 3886 views - 7.6 KB)

    Last edited by Wilczek; 02-04-2016 at 03:12.
    Wilczek is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 02-23-2013 , 22:06   Re: [CS:GO] NotifyMOTD
    Reply With Quote #2

    Use %N to use someone's name in a string rather than GetClientName() and then including it with %s.
    __________________
    Need help? PM me or add me on Steam.
    My Steam




    Quote:
    Originally Posted by Rp.KryptoNite View Post
    For some reason his Plugin never worked for me ,
    @credits were added
    im not stealing any plugins dude its my THING
    minimoney1 is offline
    PlasteR
    Senior Member
    Join Date: May 2011
    Location: Poland
    Old 02-24-2013 , 05:28   Re: [CS:GO] NotifyMOTD
    Reply With Quote #3

    WoW GZ , thx )
    Small edit and work all web )
    __________________
    PlasteR is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 02-24-2013 , 17:00   Re: [CS:GO] NotifyMOTD
    Reply With Quote #4

    Why do like this

    PHP Code:
    public PerformMOTD(clienttarget) {
        if (
    client != target) {
             new 
    String:clientName[32];
             new 
    String:targetName[32];

            
    GetClientName(clientclientName31);        
            
    GetClientName(targettargetName31);
            
            
    PrintToChatAll("\x01 \x07[MOTD] \x07%s \x07%s \x07%s \x07%s",clientName,"thinks that",targetName,"needs to read the rules!");
            
        }
        new 
    String:MOTDURL[128];
        
    GetConVarString(RulesURLMOTDURLsizeof(MOTDURL));
        
        
    ShowMOTDPanel(target"Rules"MOTDURLMOTDPANEL_TYPE_URL);

    when you can do like this

    PHP Code:
    public PerformMOTD(clienttarget
    {
        if (
    client != target) {
            
    PrintToChatAll("\x01 \x07[MOTD] %N thinks that %N needs to read the rules!"clienttarget);
            
        }
        new 
    String:MOTDURL[128];
        
    GetConVarString(RulesURLMOTDURLsizeof(MOTDURL));
        
        
    ShowMOTDPanel(target"Rules"MOTDURLMOTDPANEL_TYPE_URL);

    __________________

    Last edited by ecca; 02-24-2013 at 17:01.
    ecca is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 02-24-2013 , 17:07   Re: [CS:GO] NotifyMOTD
    Reply With Quote #5

    Quote:
    Originally Posted by ecca View Post
    Why do like this

    PHP Code:
    public PerformMOTD(clienttarget) {
        if (
    client != target) {
             new 
    String:clientName[32];
             new 
    String:targetName[32];

            
    GetClientName(clientclientName31);        
            
    GetClientName(targettargetName31);
            
            
    PrintToChatAll("\x01 \x07[MOTD] \x07%s \x07%s \x07%s \x07%s",clientName,"thinks that",targetName,"needs to read the rules!");
            
        }
        new 
    String:MOTDURL[128];
        
    GetConVarString(RulesURLMOTDURLsizeof(MOTDURL));
        
        
    ShowMOTDPanel(target"Rules"MOTDURLMOTDPANEL_TYPE_URL);

    when you can do like this

    PHP Code:
    public PerformMOTD(clienttarget
    {
        if (
    client != target) {
            
    PrintToChatAll("\x01 \x07[MOTD] %N thinks that %N needs to read the rules!"clienttarget);
            
        }
        new 
    String:MOTDURL[128];
        
    GetConVarString(RulesURLMOTDURLsizeof(MOTDURL));
        
        
    ShowMOTDPanel(target"Rules"MOTDURLMOTDPANEL_TYPE_URL);

    Isn't that what I just said?
    __________________
    Need help? PM me or add me on Steam.
    My Steam




    Quote:
    Originally Posted by Rp.KryptoNite View Post
    For some reason his Plugin never worked for me ,
    @credits were added
    im not stealing any plugins dude its my THING
    minimoney1 is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 02-25-2013 , 10:21   Re: [CS:GO] NotifyMOTD
    Reply With Quote #6

    #5

    Well he's printing out his text through strings , and that's why i pasted a remake to show.
    __________________
    ecca is offline
    Wilczek
    AlliedModders Donor
    Join Date: Oct 2012
    Location: Poland
    Old 02-26-2013 , 09:07   Re: [CS:GO] NotifyMOTD
    Reply With Quote #7

    Modify as suggested. Thanks for tips ;)

    Version 0.1.1 attached.
    Attached Files
    File Type: smx notifymotd.smx (4.9 KB, 131 views)
    File Type: sp Get Plugin or Get Source (notifymotd.sp - 386 views - 5.2 KB)
    Wilczek is offline
    Nojustice
    Junior Member
    Join Date: Jan 2013
    Old 02-26-2013 , 20:47   Re: [CS:GO] NotifyMOTD
    Reply With Quote #8

    Great plugin I must say, using !admin I have created a web application written in .NET which when the page loads then it sends a message to everyone in teamspeak that an admin is required on the server.
    Nojustice is offline
    storf
    SourceMod Donor
    Join Date: Feb 2013
    Old 03-21-2013 , 12:13   Re: [CS:GO] NotifyMOTD
    Reply With Quote #9

    Very useful plugin. Ty
    Is there anyway to modify so you could pick players from the admin menu? Some players have such long, odd names. I also have an admin that plays under the name J M. I can't get the !sm_rules J M to work for him. I had him change his name and it worked fine but as J M no such luck. I did notice that when he changed his name and I checked for his aliases, none appeared so maybe its a GO glitch.
    storf is offline
    storf
    SourceMod Donor
    Join Date: Feb 2013
    Old 03-21-2013 , 13:28   Re: [CS:GO] NotifyMOTD
    Reply With Quote #10

    I just realized I can just use the 1st or 1st 2 letters of a name and player will get motd. Very nice!
    storf 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 09:20.


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