Raised This Month: $ Target: $400
 0% 

Loyalty Plugin 2.1.1 (Updated 10-31-10)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Plugin ID:
1974
Plugin Version:
2.1.1
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Users can get loyal points by playing on your server and they can buy slots with them.
    Unapprover:
    Reason for Unapproving:
    Various errors and issues left unfixed for months. (See post #43)
    Old 09-25-2010 , 15:18   Loyalty Plugin 2.1.1 (Updated 10-31-10)
    Reply With Quote #1

    Original Plugin By MikeJS, released by nightbox: http://forums.alliedmods.net/showthread.php?t=96355

    /!\ Important! /!\ Upgrade instructions for 2.0.x to 2.1.x
    With 2.1.x the _sourcebans has been dropped from the file, so when you add the new loyal.smx to your plugins file, you need to remove the old loyal_sourcebans.smx or else run into interferance

    You *must* run the following query on your loyal table:
    Code:
    ALTER TABLE loyal
    ADD bonus INT(8) NOT NULL
    Also, the config file has been renamed to loyal.cfg, just to keep everything named the same.

    About the Plugin
    I've edit the original plugin to add support for servers running Sourcebans (specifically its admin handling), flatfile admin management, and cvars to allow easy customization of the plugin. Only tested with TF2 but should work with all source servers.

    This plugin awards players loyalty points based on their participation on the server(10 kills = 10 assists = 10 minutes = 1 point by default) and allows users to purchase reserved slots via a !loyal command, and automatically deletes them when their time expires

    This plugin works with flatfile, MySQL admins, and sourcebans.

    Installation
    If you are using sourcemods MySQL admins you must run the following query on the admin database:
    Code:
    ALTER TABLE sm_admins ADD adminuntil int(11) unsigned NOT  NULL
    Sourceban users must run the following query on their sourceban database:

    Code:
    ALTER TABLE sb_admins ADD adminuntil int(11) unsigned NOT NULL
    Add an entry in your database.cfg file for "loyal", where the loyalty points is stored. After that drop the .smx into your plugins directory, restart the server or map, and edit the cfg/sourcemod/loyal.cfg

    No matter what method of admin management you chose you must create an admin group for the loyalty members, and specify it with sm_loyal_user_group. The plugin will automatically detect what admin method you use of the 3, and adjust itself to work with your current system. If you do not have have a sourcebans or admins entry in your database config file, it assumes you use flatfile. Plugin is compatible with sqlite.

    Commands
    sm_loyal <user> - Displays user's loyalty points. If left blank, opens up purchasing menu (!loyal)

    sm_loyal_modify <user> <change> - Changes user's loyalty points by <change> amount, accepts negative numbers, requires root flag
    Cvars
    This plugin will automatically create loyalty.cfg in cfg/sourcemod
    Code:
    // Assists required per loyalty point(Warning: Changes in this are retroactive)
    // -
    // Default: "10"
    sm_loyal_assists "10"
    
    // Loyalty point cost per week of reserved slot
    // -
    // Default: "300"
    sm_loyal_cost "300"
    
    // Kills required per loyalty point(Warning: Changes in this are retroactive)
    // -
    // Default: "10"
    sm_loyal_kills "10"
    
    // What Sourcebans Server Group to add loyalty members too(if applicable)
    // -
    // Default: "All Servers"
    sm_loyal_server_group "All Servers"
    
    // Minutes of play required per loyalty point(Warning: Changes in this are retroactive)
    // -
    // Default: "10"
    sm_loyal_time "10"
    
    // User group to add loyalty members too (Sourcebans only)
    // -
    // Default: "Loyal Members"
    sm_loyal_user_group "Loyal Members"
    
    // Version of Loyalty Plugin installed, do not touch
    // -
    // Default: "2.1.0"
    sm_loyal_version "2.1.0"
    TODO
    - add options for point gaining disabling

    Changelog
    10-30-10 (2.1.1)
    - Fixed typo in a SQL query (thanks ratonofx)

    9-28-10(2.1.0)-Droped _sourcebans suffix
    -Added automatic Sourceban checker(dropped sm_loyal_sourcebans)
    -Added flatfile support
    -Added fully automatic admin method detection(flatfile, sql, sourcebans)
    -Added admin group use for all methods(untested for MySQL admins)
    -Added bonus points column
    -Added command to modify user's points
    -Cleaned up minor coding issues

    9-26-10(2.0.3)
    - Fixed silly typo in version cvar
    - Fixed error in menu selection that would allow you to select any option as long as you had enough for a week
    9-25-10(2.0.2)
    -Fixed an error in a query to remove outdated entries

    (2.0.1)
    -Added sm_loyal_version cvar for plugin tracking and general information

    9-25-10(2.0.0 release)
    - Plugin development taken over by Xsinthis

    Enjoy!
    And report any and all bugs you may find, this is the first plugin i have ever worked on so I would be surprised if it works flawlessly for everyone
    Attached Files
    File Type: sp Get Plugin or Get Source (loyal.sp - 1506 views - 18.9 KB)
    __________________

    Last edited by Xsinthis; 11-03-2010 at 12:30.
    Xsinthis is offline
    mjmfighter
    Member
    Join Date: Jun 2010
    Old 09-25-2010 , 21:36   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #2

    Congrats on your first plugin, but i would like to make a feature request.

    The ability to buy more than just one think. Such as buying skins, or high ping kicker ability. I think all it would have to do is instead of adding them to a group on sourcebans, just add tags to them in sourcebans.

    I hope that makes sense. but congrats on ur first plugin
    mjmfighter is offline
    Xsinthis
    Senior Member
    Join Date: Oct 2008
    Location: Canadia, eh?
    Old 09-25-2010 , 21:54   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #3

    Well i didn't make it from scratch, but thanks

    I'm guessing your talking about adding them individually? As in each one costs their own amount of points? Like they'd have to buy slots, skin, ping immunity would need separate purchasers? I'm sure there's other plugins to do that, and I don't think this is the appropriate plugin for that. If there's a large demand for it I'll work it into future version definatly
    __________________
    Xsinthis is offline
    mjmfighter
    Member
    Join Date: Jun 2010
    Old 09-25-2010 , 22:00   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #4

    alrighty, thanks. time to go searching for that plugin lol
    mjmfighter is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 09-25-2010 , 22:12   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #5

    Might also be nice to have the option to not create points at all. Instead give out points as a admin, through a menu.

    So for instance you have a donating person, give him 5000 points or something like that and he can choose his own "rewards" that way the plugin could serve a second goal too.

    Besides that, good work!
    snelvuur is offline
    Xsinthis
    Senior Member
    Join Date: Oct 2008
    Location: Canadia, eh?
    Old 09-25-2010 , 22:39   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #6

    Quote:
    Originally Posted by snelvuur View Post
    Might also be nice to have the option to not create points at all. Instead give out points as a admin, through a menu.

    So for instance you have a donating person, give him 5000 points or something like that and he can choose his own "rewards" that way the plugin could serve a second goal too.

    Besides that, good work!
    hmm thats an interesting idea, though pretty much takes away from the automation of it
    __________________
    Xsinthis is offline
    Xsinthis
    Senior Member
    Join Date: Oct 2008
    Location: Canadia, eh?
    Old 10-03-2010 , 18:05   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #7

    Quote:
    Originally Posted by snelvuur View Post
    Might also be nice to have the option to not create points at all. Instead give out points as a admin, through a menu.

    So for instance you have a donating person, give him 5000 points or something like that and he can choose his own "rewards" that way the plugin could serve a second goal too.

    Besides that, good work!
    This can be done with the new version now. The easiest way would be to use the sm_loyal_modify <NAME> <CHANGE> command ingame, but requires the person be ingame at the time. A better way would be to go in through the MySQL database and add bonus points there using a php script or manual queries.
    __________________
    Xsinthis is offline
    badwolf
    Senior Member
    Join Date: Apr 2010
    Old 10-13-2010 , 11:07   Re: Loyalty Plugin 2.1.0 (Updated 09-28-10)
    Reply With Quote #8

    What happens when you set sm_loyal_time to 0? Can that factor of the equation be disabled if you do set it to 0? If not, can you add that as a feature please.
    badwolf is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 09-26-2010 , 06:17   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #9

    The problem that i could see is that if you set a value to low, and offer reserved slots in return for instance. The people that actually donated might not be able to join the servers because there are people that earned it with loyal points. Basicly destroying a second donation of that player if he cant get in

    even if i say you need 10days of connection time to get it, then still about 50 people have it. Its hard to find the correct "balance" when to give it out.
    snelvuur is offline
    Xsinthis
    Senior Member
    Join Date: Oct 2008
    Location: Canadia, eh?
    Old 09-26-2010 , 10:34   Re: Loyalty Plugin 2.0 (With Sourcebans support)
    Reply With Quote #10

    I personally don't use paid donators, which is why i put the work into this plugin, I use it stand alone. However, most of the reserved slots systems out there (including the base sourcemod one) i believe let you set immunity preference, so you can set loyalty members to have zero immunity and like the paid donators to 1

    V2.0.3
    - Fixed silly typo in version cvar
    - Fixed error in menu selection that would allow you to select any option as long as you had enough for a week
    __________________

    Last edited by Xsinthis; 09-26-2010 at 10:58.
    Xsinthis 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 21:20.


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