Raised This Month: $32 Target: $400
 8% 

Loyalty Point System


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Chefe
Senior Member
Join Date: Dec 2009
Location: Germany
Plugin ID:
2299
Plugin Version:
2.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    System that gives players points for their playtime.
    Old 04-05-2011 , 16:17   Loyalty Point System
    Reply With Quote #1

    Loyalty Point System

    Welcome to my newest plugin creation.

    With this plugin, you can give your players rewards for their loyalty in terms of loyalty points. All 5 minutes all players on the server get an amount of points, based on the serverload (only few players -> lot of points; medium amount -> medium points and lots of players -> least points).
    If a player have enough of these points, he can buy bonuses (NOT gameplay bonuses, it's NOT a premium plugin), like set nextmap, perform a mapchange or, the top of all, get an reserved slot on your server! Players who actually not play on the server get a little subtraction on their points.
    This also works across multiple servers (I had it across a Day of Defeat:Source and a Team Fortress 2 server working), the players have the same points & reserved slot access on all servers (based on you use the same database for them).


    Requirements

    There are some preconditions your server must conform to get the system working:
    • your admin-management must work by SQL-database (and you need access to this database to create the table that is needed)
    • besides the sql-admin-plugins, mapchooser (for eg. nextmap) and reservedslots have to be activated (mapchooser only for the full version, not required with lp_light)


    Games Supported

    Tested with:
    • Team Fortress 2
    • Day of Defeat: Source
    • Counter Strike: Source
    • HL2: Deathmatch
    • SourceForts
    Should work with:
    • Left4Dead(2)


    Installation

    1. Download the lp_sql.zip, extract it and run the lp.sql in the database of your choice, but remember, the database also have to contain the table sm_admins and this database have to be the default one in /addons/configs/databases.cfg
    2. Download the plugin (lp.smx), move it to your plugin folder
    3. Restart your server, so that sourcemod can create the config file for the plugin (/cfg/sourcemod/plugin.lp.cfg)
    4. Edit the config file after your mind
    5. Restart the server again to activate your settings

    All convars are described in the plugin cfg. Be sure that you have different sm_lp_serverid numbers if you run the plugin on different servers with the same database.

    I hope you can enjoy it.


    ToDo
    • add some more cvars to make the plugin more adjustable [done]
    • add translations
    • add SourceBans support
    • add SourceMod Webinterface support


    Changelog

    1.0

    - initial release

    1.1

    - added convars for setting amount of points players receive (see plugin cfg for more infos)
    - added convar sm_lp_version
    - removed some not required code

    1.2

    - fixed connection check failed after getting no database connection

    1.3

    - added convars for turn on/off features like mapvote or nextmap

    1.4

    - added array to store clients idīs in
    - fixed loop updates points for bots & non-existing clients
    - fixed some performance issues

    1.5

    - made some changes to improve performance
    - added AdmCmd to refresh settings ingame
    - settings are now refreshed every 5 minutes
    - made some changes on the table (see sql changelog)
    - sql-errors now go to errorlog instead of serverconsole
    - improved display of reserved slot time remaining
    - inactive players now automatic get removed daily

    1.6

    - added version define (thx to Greyscale)

    1.7

    - fixed mapmenus are not rebuild after closing handle (error reported by skywalker2000, thanks for that)

    1.8

    - fixed settings are not set correctly after plugin startup (now use sm_lp_refresh to refresh the settings ingame)

    1.9

    - fixed some spelling mistakes
    - moved to threaded querys
    - various other fixes/improvements
    - added light version - no requirement of mapchooser

    2.0

    - reserved slot players now get only the a flag instead of a and b
    - fixed a spelling mistake

    2.1


    - added convar for immunity and flags a reserved slot player becomes


    SQL-Changelog

    1.1

    - added fields needed for changes in plugin version 1.5 (upgrade file from 1.0 is included in the zip)

    Remember to use lp or lp_light, not both!
    Attached Files
    File Type: zip lp_sql_v1-1.zip (542 Bytes, 1111 views)
    File Type: sp Get Plugin or Get Source (lp.sp - 1842 views - 22.9 KB)
    File Type: sp Get Plugin or Get Source (lp_light.sp - 1527 views - 15.8 KB)

    Last edited by Chefe; 09-01-2014 at 17:02. Reason: new plugin version
    Chefe is offline
    rediem
    SourceMod Donor
    Join Date: Jul 2010
    Old 04-06-2011 , 06:45   Re: Loyalty Point System
    Reply With Quote #2

    Nice plugin.
    rediem is offline
    Chefe
    Senior Member
    Join Date: Dec 2009
    Location: Germany
    Old 04-06-2011 , 10:52   Re: Loyalty Point System
    Reply With Quote #3

    Quote:
    Originally Posted by rediem View Post
    Nice plugin.
    Sound nice or work nice?
    Chefe is offline
    arm5ky
    Member
    Join Date: Dec 2007
    Old 04-06-2011 , 20:07   Re: Loyalty Point System
    Reply With Quote #4

    Nice. any chance for a convar for maxplayers.
    I only want to add time whilst there are a few players on, not when its full.
    arm5ky is offline
    Chefe
    Senior Member
    Join Date: Dec 2009
    Location: Germany
    Old 04-07-2011 , 09:02   Re: Loyalty Point System
    Reply With Quote #5

    Quote:
    Originally Posted by arm5ky View Post
    Nice. any chance for a convar for maxplayers.
    I only want to add time whilst there are a few players on, not when its full.

    Its already on my todo list to make a cvar to change the amount of points given. Now:

    <= 25% of maxplayers on server: 3 points
    between 25% and 50%: 2 points
    > 50%: 1 point

    In one of the next version I will add convars to change the point-amount that is given.

    Last edited by Chefe; 04-07-2011 at 09:28.
    Chefe is offline
    Chefe
    Senior Member
    Join Date: Dec 2009
    Location: Germany
    Old 04-07-2011 , 10:20   Re: Loyalty Point System
    Reply With Quote #6

    Update to 1.1
    __________________
    My plugin repo, you're welcome to clone/pr or report issues there: SomeGit

    OpenFastDL: openfastdl.net
    Open public shared moderated FastDL for free use

    Last edited by Chefe; 04-09-2011 at 21:18.
    Chefe is offline
    Harley
    Member
    Join Date: Aug 2006
    Old 04-09-2011 , 05:49   Re: Loyalty Point System
    Reply With Quote #7

    L 04/09/2011 - 00:129: [SM] Displaying call stack trace for plugin "lp.smx":
    L 04/09/2011 - 00:129: [SM] [0] Line 720, /home/groups/alliedmodders/forums/files/6/4/8/1/2/84468.attach::CheckCon()
    L 04/09/2011 - 00:129: [SM] [1] Line 74, /home/groups/alliedmodders/forums/files/6/4/8/1/2/84468.attach::OnPluginStart()
    __________________
    Harley is offline
    Chefe
    Senior Member
    Join Date: Dec 2009
    Location: Germany
    Old 04-09-2011 , 21:16   Re: Loyalty Point System
    Reply With Quote #8

    Quote:
    Originally Posted by Harley View Post
    L 04/09/2011 - 00:129: [SM] Displaying call stack trace for plugin "lp.smx":
    L 04/09/2011 - 00:129: [SM] [0] Line 720, /home/groups/alliedmodders/forums/files/6/4/8/1/2/84468.attach::CheckCon()
    L 04/09/2011 - 00:129: [SM] [1] Line 74, /home/groups/alliedmodders/forums/files/6/4/8/1/2/84468.attach::OnPluginStart()
    Update to 1.2
    __________________
    My plugin repo, you're welcome to clone/pr or report issues there: SomeGit

    OpenFastDL: openfastdl.net
    Open public shared moderated FastDL for free use
    Chefe is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 04-10-2011 , 11:55   Re: Loyalty Point System
    Reply With Quote #9

    really neat idea. I like it. Now, I'll just have to switch to MySQL instead of admin_simple
    TnTSCS is offline
    Harley
    Member
    Join Date: Aug 2006
    Old 04-20-2011 , 08:56   Re: Loyalty Point System
    Reply With Quote #10

    nice plugin thx
    __________________
    Harley is offline
    Reply


    Thread Tools
    Display Modes

    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 20:52.


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