Raised This Month: $51 Target: $400
 12% 

Slot Expiration Notification [v0.83b]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DaRk NiGhT
Junior Member
Join Date: Nov 2007
Plugin ID:
294
Plugin Version:
0.83b
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Shows players when their reserved slot expires.
    Old 02-23-2008 , 17:43   Slot Expiration Notification [v0.83b]
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (slotexpiration.sp - 1585 views - 7.8 KB)
    __________________
    -: DaRk NiGhT :-


    Last edited by DaRk NiGhT; 03-07-2008 at 19:36.
    DaRk NiGhT is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 02-23-2008 , 19:09   Re: Slot Expiration Notification
    Reply With Quote #2

    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.
    __________________

    DontWannaName is offline
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 02-23-2008 , 20:39   Re: Slot Expiration Notification
    Reply With Quote #3

    Quote:
    Originally Posted by DontWannaName View Post
    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.
    __________________
    Extreme_One is offline
    DaRk NiGhT
    Junior Member
    Join Date: Nov 2007
    Old 02-23-2008 , 22:16   Re: Slot Expiration Notification
    Reply With Quote #4

    Yea Extreme_One is right. Sorry for not being more specific. I'll update my post with a better description.
    __________________
    -: DaRk NiGhT :-

    DaRk NiGhT is offline
    DaRk NiGhT
    Junior Member
    Join Date: Nov 2007
    Old 03-07-2008 , 19:37   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #5

    • Updated to v0.83b
      • Changed Debugging From Using a Boolean Variable to Using IsPluginDebugging.
    __________________
    -: DaRk NiGhT :-

    DaRk NiGhT is offline
    dann
    Senior Member
    Join Date: Nov 2007
    Old 05-04-2008 , 06:52   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #6

    how do you add players to the database? can you use the same database that you have set up for admin?
    dann is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 05-04-2008 , 07:34   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #7

    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.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    dann
    Senior Member
    Join Date: Nov 2007
    Old 05-04-2008 , 12:29   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #8

    is the script publicly available?
    dann is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 05-04-2008 , 14:20   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #9

    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.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    matrix-host
    Junior Member
    Join Date: Apr 2008
    Old 06-29-2008 , 16:33   Re: Slot Expiration Notification [v0.83b]
    Reply With Quote #10

    Can someone help me out with this? I just need to know the format of the expiration time sql cell anyone?
    matrix-host is offline
    Reply



    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:55.


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