AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Random MOTD pictures (https://forums.alliedmods.net/showthread.php?t=318370)

Dragokas 08-27-2019 15:12

[ANY] Random MOTD pictures
 
1 Attachment(s)
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

iGANGNAM 08-27-2019 15:37

Re: [ANY] Random MOTD pictures
 
Motd is gone since Panorama update on CS:GO, unless i'm wrong ;)

Dragokas 08-27-2019 15:38

Re: [ANY] Random MOTD pictures
 
Ok, thanks for the info.

Dragokas 08-30-2019 09:12

Re: [ANY] Random MOTD pictures
 
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.

Dragokas 01-26-2020 12:12

Re: [ANY] Random MOTD pictures
 
Updated.

Quote:

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

1.3 (24-Jan-2020)
- Fixed KeyValues handles leak.

ZBzibing 06-27-2022 21:24

Re: [ANY] Random MOTD pictures
 
There is still such a function, I myself implemented it with HTML script


All times are GMT -4. The time now is 18:59.

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