Raised This Month: $68 Target: $400
 17% 

[ANY] Random MOTD pictures


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine
Plugin ID:
6693
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Show random MOTD picture on each round start (default picture - for newly connected players)
    Old 08-27-2019 , 15:12   [ANY] Random MOTD pictures
    Reply With Quote #1

    Description:

    Show random MOTD picture on each round start.
    Newly connected players will see the default motd.txt.
    When you press "H" you should also see the default motd.txt.
    Using:

    - You should prepare picture1.jpg, picture2.jpg --- ... --- pictureX.jpg files
    and upload them to your site (content-server), e.g.: http://your-site.com/folder/picture1.jpg

    They should be directly accessible from the browser.
    Ensure, pictures are not too big in size/disk space, better <= 300 KB.
    Compatibility:
    - L4D1.
    - L4D2 - (untested)
    - TF2 - (untested)
    Commands:
    sm_motd - (Root admin only) - Change MOTD screen and open it.
    Settings (ConVars):

    sm_motd_random_enable - def.: 1 - Enable plugin (1 - On / 0 - Off)
    sm_motd_random_picture_address - def.: http://your-site.com/folder/picture{}.jpg - Web-address of pictures. {} will be replaced by number (1 ... N)
    sm_motd_random_count - def.: 10 - Total count of pictures on FTP
    sm_motd_random_selection_type - def.: 1 - How to select picture number: 0 - randomly, 1 - consistently
    sm_motd_random_title - def.: Welcome - Title of MOTD
    (TF2) dynamicmotd_big - def.: 0 - If enabled, uses a larger MOTD window (TF2-only!). 0 - Disabled (default), 1 - Enabled
    Using:

    Copy smx to addons/sourcemod/plugins
    Credits:

    * Thanks to "p3tsin" for "String table MOTD replacer"
    https://forums.alliedmods.net/showpo...3&postcount=12

    * Thanks to "psychonic" for "Dynamic MotD Replacer"
    https://forums.alliedmods.net/showthread.php?t=147193

    Most of code is based on above works. So, most regards to that guys.
    TODO:

    - find a method to detect when string table finish caching the image.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_motd_random.sp - 67 views - 15.9 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst.
    [My plugins] [My tools] [GitHub]

    Last edited by Dragokas; 08-30-2019 at 16:24.
    Dragokas is offline
    iGANGNAM
    AlliedModders Donor
    Join Date: Sep 2012
    Location: Lithuania
    Old 08-27-2019 , 15:37   Re: [ANY] Random MOTD pictures
    Reply With Quote #2

    Motd is gone since Panorama update on CS:GO, unless i'm wrong ;)
    __________________
    iGANGNAM is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 08-27-2019 , 15:38   Re: [ANY] Random MOTD pictures
    Reply With Quote #3

    Ok, thanks for the info.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst.
    [My plugins] [My tools] [GitHub]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 08-30-2019 , 09:12   Re: [ANY] Random MOTD pictures
    Reply With Quote #4

    Updated.

    Quote:
    1.1 (30-Aug-2019)
    - Fixed case with "double" motd show
    - Code logic is simplified
    - "motd" ConVar is set to "0" by default because it is handled by this plugin.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst.
    [My plugins] [My tools] [GitHub]
    Dragokas 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 15:56.


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