Slot Expiration Notification by DaRk NiGhT
[ Description ]
Shows people with a reserved slot when their slot expires. The expiration is shown automatically when they join and on-demand with the command "sm_expiration" (/expiration in Chat).
[ CVars ]
sm_slotexpiration_version - Shows What Version of Slot Expiration Notification You Have
sm_slotexpiration_sid - Server ID Slot Expiration Notification Should Use
[ Commands ]
sm_expiration (/expiration in Chat) - Shows a Player Their Slot Expiration
[ Instructions for Database Setup ]
To use this plugin properly, you must have a database with who's slot expires when. The first step to this is adding the following to your "addons/sourcemod/configs/databases.cfg". Obviously, you need to change the values for your database. (Leave it named "slots" though.)
Code:
"slots"
{
"driver" "default"
"host" "mysql.something.com"
"database" "databasename"
"user" "username"
"pass" "password"
}
The next step is the database itself. This plugin is designed to work with a table like this:
Code:
CREATE TABLE `slot_expirations` (
`id` int(10) NOT NULL auto_increment,
`steamid` varchar(255) NOT NULL,
`expiration` varchar(255) NOT NULL,
`serverid` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
The structure of the table can vary depending on your needs HOWEVER: 'id' and 'steamid' MUST be the first two columns and 'serverid' MUST be present. If you only have one server, 'serverid' should just be 0 for all the entries and the table must be named 'slot_expirations'. This might be confusing so post or PM if you need help!
[Change Log ]- v0.83b (3/07/0
- Changed Debugging From Using a Boolean Variable to Using IsPluginDebugging.
- v0.82b
- Changed File Paths to Use BuildPath()
- Added sm_slotexpiration_sid Option
- v0.8b - v.0.81b
- Fixed Huge Flaw With My onMapEnd
- v0.1b - v0.7b
- Initial Testing/Beta Versions