PDA

View Full Version : Slot Expiration Notification [v0.83b]


DaRk NiGhT
02-23-2008, 17:43
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.)
"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:
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/08)
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 :grrr:
v0.1b - v0.7b
Initial Testing/Beta Versions

DontWannaName
02-23-2008, 19:09
Why cant the plugin just sense who has a reserved slot and add them? The MySQL makes this a little confusing. But its a nice idea.

Extreme_One
02-23-2008, 20:39
Why cant the plugin just sense who has a reserved slot and add them? The MySQL makes this a little confusing. But its a nice idea.

Because this is meant to show people how long they have remaining for their reserved slot which was set for a predetermined period of time as defined in a MySQL database.

Great idea.:up:

DaRk NiGhT
02-23-2008, 22:16
Yea Extreme_One is right. Sorry for not being more specific. I'll update my post with a better description.

DaRk NiGhT
03-07-2008, 19:37
Updated to v0.83b
Changed Debugging From Using a Boolean Variable to Using IsPluginDebugging.

dann
05-04-2008, 06:52
how do you add players to the database? can you use the same database that you have set up for admin?

DJ Tsunami
05-04-2008, 07:34
It's a seperate database. This plugin was meant for DaRk_NiGhT's script he used so people could sign up for a slot on the website, send the money through PayPal and then the script would automatically add them to
the database for reserved slots.

dann
05-04-2008, 12:29
is the script publicly available?

DJ Tsunami
05-04-2008, 14:20
Not as far as I know, you would have to contact DaRk_NighT. He hasn't been on in 2 months though, so I don't know if you'll be able to reach him.

matrix-host
06-29-2008, 16:33
Can someone help me out with this? I just need to know the format of the expiration time sql cell anyone?

mats
07-13-2009, 15:46
Can someone help me out with this? I just need to know the format of the expiration time sql cell anyone?
I have the same question, tried alot but its just saying that I don't have a slot on this server

Kenny Loggins
07-13-2009, 19:05
Its Unix Time Stamp format

http://www.unixtimestamp.com/index.php

animalnots
02-27-2013, 14:18
Hi, can you integrate it with sourcebans? Just use sourcebans tables (alter table query). If you need help with it let me know. And get rid of serverids, you can use flag check or just get it working with sb tables.

Addicted.
03-12-2015, 22:19
What format does the steamid have to be in?

Also I assume the "id" column can be used to number each user?

kills
01-24-2016, 04:17
Pls update

/home/groups/sourcemod/upload_tmp/phpMhwqyq.sp(83) : warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId