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

Modular Advertisements


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Plugin ID:
4336
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Display advertisements in your server
    Old 09-03-2014 , 19:21   Modular Advertisements
    Reply With Quote #1

    Modular Advertisements

    Description:
    Yes, another advertisements plugin, yippy. It is pretty much a copy pasterino witth some changes that offer some interesting oppurtunities for plugin developers. Several server have issues where their chat is spammed with different advertisements from different plugins. This update fixes that issue.
    Control Variables:
    • sm_advertisements_enabled (default: 1) Enable/Disable the plugin
    • sm_advertisements_file (default: advertisements.txt) Advertisements configuration file
    • sm_advertisements_interval (default: 30) Advertisements interval
    Natives:
    Code:
    /**
     * Register an advertisement
     * 
     * @param strType		Type of advertisement
     * @param strText		Text to display
     * @param strFlags		Required admin flag(s) to view the advertisement
     * @noreturn
     */
    native RegisterAdvertisement(String:strType[], String:strText[], String:strFlags[] = "none");
    
    // Example
    RegisterAdvertisement("S", "{olive}Type !forum to visit our website!");
    Forwards:
    Code:
    /**
     * Called when the advertisement configuration file is loaded
     * 
     * @noreturn
     */
    forward OnAdvertisementsLoaded(client);
    Configuration: (default: advertisements.txt)
    Code:
    "Advertisements"
    {
        "1"
        {
            "type"        "S"
            "text"        "{GREEN}[email protected]"
        }
        "2"
        {
            "type"        "T"
            "text"        "www.domain.com"
            "flags"       "a"
        }
    }
    Version Log:
    • Version 1.0
      • Initial Release
    Installation:
    1) Add the files included in this post to their folders relative to sourcemod/addons
    • advertisements.smx to plugins
    • advertisements.txt to configs
    My Plugins
    intox Gaming
    Attached Files
    File Type: smx advertisements.smx (18.0 KB, 929 views)
    File Type: inc advertisements.inc (854 Bytes, 824 views)
    File Type: sp Get Plugin or Get Source (advertisements.sp - 778 views - 10.3 KB)
    File Type: txt advertisements.txt (971 Bytes, 956 views)

    Last edited by ReFlexPoison; 09-03-2014 at 19:53.
    ReFlexPoison is offline
     



    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:27.


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