Raised This Month: $32 Target: $400
 8% 

[ANY] Random MOTD pictures


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6693
Plugin Version:
1.3
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)
    - CSGO - unsupported since Panorama update.
    Commands:
    sm_motd - (Root admin only) - Change MOTD screen and open it.
    Settings (ConVars):
    cfg/sourcemod/sm_motd_random.cfg

    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
    Installation:
    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.
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_motd_random.sp - 755 views - 16.1 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 04-15-2021 at 08:54.
    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 on fire
    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. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    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. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-26-2020 , 12:12   Re: [ANY] Random MOTD pictures
    Reply With Quote #5

    Updated.

    Quote:
    1.2 (30-Aug-2019)
    - Fixed incorrect cvar name.

    1.3 (24-Jan-2020)
    - Fixed KeyValues handles leak.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 01-26-2020 at 12:13.
    Dragokas is offline
    ZBzibing
    Senior Member
    Join Date: Dec 2012
    Old 06-27-2022 , 21:24   Re: [ANY] Random MOTD pictures
    Reply With Quote #6

    There is still such a function, I myself implemented it with HTML script
    __________________
    Please forgive, If I'm not describing it accurately. I use google translate
    Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
    ZBzibing 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 07:44.


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