DBMotd (Date Based Motd)

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

DBMotd (Date Based Motd)

Post by greenie »

Date Based Motd 1.0

Description:
This plugin will change your motd depending on date for example if you have a file in cstrike/motds named YearMonthDay.txt will when the server thinks that date is be used as your motd when that date is over will it replace it with either a new date or cstrike/motds/default.txt
Depending on cvar will it check the date On round end or roundstart or both

Cvars:
motd_check 2 //When to check the date 1 = at start 2 = end 3 = end and start

Commands:
/thedate - Tells you what the date is incase you dont know what the servers is.
Credits:
Exolent[jNr] - Replace file function and general fix.
Changelog:
0.1
-Idea -start coding
0.5 -Replace function by Exolent
0.6 -Fix of code
1.0 -Release
How to make a motd appear on a specific date:
First i suggest you use the command /thedate (it will say YYYYMMDD (no 0 is needed if its for example januari)) so you know what date you should go after since it will check the servers date.
Then in cstrike/motds/ create a text file named YYYYMMDD.txt (The date you want it to show up YYYY = year MM = month DD = Day) then you just write in it as any motd.
Example: cstrike/motds/2009717.txt would result in a new motd the 17th july 2009 (tomorrow that is)
Usage:
Idk maybe a contest.
To-do:
Preview command
improve the helper
Note:
If the new motd thats supposed to replace the old one is longer than the character limit (which i think is around 1500) wont the new one appear.

get plugin
get source
Post Reply

Return to “General Purpose”