Raised This Month: $ Target: $400
 0% 

Loyalty Plugin 2.1.1 (Updated 10-31-10)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
     


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


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