Raised This Month: $101 Target: $400
 25% 

[Any][MySQL] tVip (2.1 | 27-06-17) - The simplest to use Vip Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Plugin ID:
5472
Plugin Version:
2.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Add Vips for a limited time and give those a flag of your choice with live MySQL Sync
    Old 12-31-2016 , 10:46   [Any][MySQL] tVip (2.1 | 27-06-17) - The simplest to use Vip Manager
    Reply With Quote #1

    Hey0,

    Today I'm going to present a Plugin to you that is available in other forms but not with this featureset.


    This Plugin allows you to add Vips on the fly to your Server, extend their Status or Remove them.
    You can also lookup the details of Vips in a simple to use Menu.

    The Plugin was designed for Large Communities that run a big amount of servers.
    This is why it has a live MySQL Sync. This means no data is stored locally and everything is instantly synced to the database to allow a seamless workflow.


    Let's get to the details.

    INSTALLATION:
    - IT WON'T WORK WITHOUT DOING THIS -
    Quote:
    The default MySQL config is tVip which needs to be added to your database.cfg.
    If you want another name, change line 13 in the .sp
    Spoiler


    There is a config called tVip under cfg/soucemod that allow you to change the flag.

    The following commands are available:

    Quote:
    sm_tvip - Root Flag - Opens the tVip Admin menu
    sm_addvip "<SteamID>" <Duration in Month> "<Name>" - Root Flag - Add a Vip manually (offline)
    sm_removevip "<SteamID>" - Root Flag - Removes a Vip manually (offline)
    sm_vips - no flag - Shows all VIPs
    sm_vip - Displays the Start date, End date and duration of the Status in a menu
    Config:
    Quote:
    // This file was auto-generated by AutoExecConfig read and append beta
    // ConVars for plugin "tVip.smx"


    // 20=Custom6, 19=Custom5 etc. Numeric Flag See: 'https://wiki.alliedmods.net/Checking_Admin_Flags_(SourceMod_Scripting)' for Definitions ---- Multiple flags seperated with Space: '16 17 18 19' !!
    // -
    // Default: "19"
    tVip_flag "19 20"

    // Test Vip duration in minutes
    // -
    // Default: "15"
    tVip_testVipDuration "15"
    Compatible Plugins:
    [ANY] Reserved Slots with tVip support

    That's about it.
    I hope it's usefull for some of you.

    If you are interested in other Plugins (Zephstore parts & more), checkout my Website

    Images:








    Natives:
    PHP Code:
    /**
     * Grant vip to a client.
     *
     * @param admin          Admin that set VIP.
     * @param client         Client that will recive VIP.
     * @param duration        Vip duration.
     * @param format         Time format, 1 = Minutes - 0 = Month.
     * @noreturn
     * @error                Invalid client/admin Index or invalid format.
     */
    native void tVip_GrantVip(int clientint adminint durationint format 1);



    /**
     * Delete Vip from database.
     *
     * @param SteamId          Client SteamID.
     * @noreturn
     */
    native void tVip_DeleteVip(char SteamId[20]); 
    Changelog:

    Quote:
    2.1
    + added natives Thanks @Hexer10
    2.0
    * Generic Steam ID storage - thanks zeph
    * bugfix in extend
    * to update you need to drop your tables
    1.8
    * fixed mysql alter table bug from 1.4/1.5
    1.7
    * changed some words
    1.6
    * allows the update of a player on added
    1.4/1.5
    + added sm_removevip command
    * allowed sm_addvip to be used by the console
    1.3
    * fixed out of bounds exception in config
    1.2
    + Added Multiple Flag Support
    + Added Test Vip
    + Added sm_vip Command
    1.1
    - Removed Smlib
    + Added Config file for the Flag
    1.0 Init
    Github: https://github.com/Totenfluch/tVip

    Download Count: 521
    Attached Files
    File Type: sp Get Plugin or Get Source (tVip.sp - 369 views - 24.5 KB)
    File Type: inc tVip.inc (733 Bytes, 288 views)
    File Type: smx tVip.smx (30.3 KB, 15 views)
    __________________
    Developer of the German Games Community
    My Website

    Notable Projects:
    Event Item Spawner | Scissors, Rock, Paper for ZephStore
    tVip | Smart Link Remover
    PLG & GGC - CS:GO Roleplay

    and countless more...

    I can make a helicopter shoot missles if you want me to...

    Last edited by Totenfluch; 12-01-2018 at 22:19.
    Totenfluch is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 12-31-2016 , 11:46   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #2

    Looks really good, and for sure a upgrade!

    Pros: Promising script, with a easy to use menu, nice release!
    Cons: Code Could need a bit more optimization and readability, nothing major.
    __________________
    xines is offline
    Totenfluch
    AlliedModders Donor
    Join Date: Jan 2012
    Location: Germany
    Old 12-31-2016 , 11:53   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #3

    Quote:
    Originally Posted by xines View Post
    Looks really good, and for sure a upgrade!

    Pros: Promising script, with a easy to use menu, nice release!
    Cons: Code Could need a bit more optimization and readability, nothing major.

    > public Action cmdAddVip(int client, int args) ?

    It's a bit messy but I'm not sure how to otimize it without damaging the functionality


    Everything else looks fine from my side and standard coding guidelines are enforced in 99% of all lines.

    What did you find that needs optimization?
    __________________
    Developer of the German Games Community
    My Website

    Notable Projects:
    Event Item Spawner | Scissors, Rock, Paper for ZephStore
    tVip | Smart Link Remover
    PLG & GGC - CS:GO Roleplay

    and countless more...

    I can make a helicopter shoot missles if you want me to...

    Last edited by Totenfluch; 12-31-2016 at 11:55.
    Totenfluch is offline
    xines
    Veteran Member
    Join Date: Aug 2013
    Location: Denmark
    Old 12-31-2016 , 12:11   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #4

    Quote:
    Originally Posted by Totenfluch View Post
    What did you find that needs optimization?
    You are welcome to add me and i'll provide some improvements, but as i already said, it's nothing major. Overall it looks promising, i won't spam this thread with improments as you and i would hate that aswell.
    __________________
    xines is offline
    Orgy
    Junior Member
    Join Date: Nov 2016
    Old 12-31-2016 , 18:18   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #5

    Quote:
    The default MySQL config is tVip which needs to be added to your database.cfg.
    I think this is where I'm having an issue, I don't quite understand what you mean by this, and due to it I believe I'm getting a startup plugin error.

    Last edited by Orgy; 12-31-2016 at 18:19.
    Orgy is offline
    Totenfluch
    AlliedModders Donor
    Join Date: Jan 2012
    Location: Germany
    Old 12-31-2016 , 21:54   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #6

    Quote:
    Originally Posted by Orgy View Post
    I think this is where I'm having an issue, I don't quite understand what you mean by this, and due to it I believe I'm getting a startup plugin error.


    __________________
    Developer of the German Games Community
    My Website

    Notable Projects:
    Event Item Spawner | Scissors, Rock, Paper for ZephStore
    tVip | Smart Link Remover
    PLG & GGC - CS:GO Roleplay

    and countless more...

    I can make a helicopter shoot missles if you want me to...
    Totenfluch is offline
    Xenoadria
    Member
    Join Date: Oct 2016
    Old 01-02-2017 , 07:20   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #7

    Is it possible to use this plugin with sqlite ?
    So it uses local storage for each server?

    Edit:
    Also if I would like to change flag in .sp line 21; int g_iFlag = 19;
    Should be int g_iFlag = 0 (if I would like flag A ) ?

    Edit#2:
    I am retarded regarding this compiling, how exactly am I supposed to do this ?

    Sorry for so many questions.
    Great plugin, it does exactly what I wanted for some time now. Thank you for this

    Last edited by Xenoadria; 01-02-2017 at 10:46.
    Xenoadria is offline
    Totenfluch
    AlliedModders Donor
    Join Date: Jan 2012
    Location: Germany
    Old 01-02-2017 , 11:45   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #8

    Quote:
    Is it possible to use this plugin with sqlite ?
    Since I'm not fluent in sqlite and MySQL is the better choice in my opinion no

    Quote:
    So it uses local storage for each server?
    This kind of ruins the idea of the plugin. But if you want just use different databases or alter the table name in the sp

    Quote:
    Also if I would like to change flag in .sp line 21; int g_iFlag = 19;
    Should be int g_iFlag = 0 (if I would like flag A ) ?
    Theoretically Yes. Your VIPs will get the A flag. Practically I can't say if it gives the users actual permissions in the base sourcemod Admin menu. That's something you have to test. But you got the Idea.

    Quote:
    I am retarded regarding this compiling, how exactly am I supposed to do this ?
    https://wiki.alliedmods.net/Compiling_SourceMod_Plugins
    or https://spider.limetech.io/
    The only requirements are multicolors.inc ( https://github.com/Bara20/Multi-Colo...ulticolors.inc and https://github.com/bcserv/smlib/tree...ipting/include )

    Quote:
    Sorry for so many questions.
    np

    Quote:
    Great plugin, it does exactly what I wanted for some time now.
    Thanks.
    __________________
    Developer of the German Games Community
    My Website

    Notable Projects:
    Event Item Spawner | Scissors, Rock, Paper for ZephStore
    tVip | Smart Link Remover
    PLG & GGC - CS:GO Roleplay

    and countless more...

    I can make a helicopter shoot missles if you want me to...

    Last edited by Totenfluch; 01-02-2017 at 12:23.
    Totenfluch is offline
    Xenoadria
    Member
    Join Date: Oct 2016
    Old 01-02-2017 , 12:08   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #9

    Quote:
    Originally Posted by Totenfluch View Post
    First of all thank you for the answers. I've tried to compile the plugin with this compiler: https://spider.limetech.io/
    I've included multicolors.inc and then I get the following error:
    Spoiler


    So I figured maybe I need to include smlib.inc aswell.
    Which I did, and this error occurs:
    Spoiler
    Xenoadria is offline
    Totenfluch
    AlliedModders Donor
    Join Date: Jan 2012
    Location: Germany
    Old 01-02-2017 , 12:22   Re: [Any] tVip (1.0 | 31-12-16) - The simplest to use Vip Manager
    Reply With Quote #10

    I'll get that dependency out tomorrow it's just a convenience for me and not needed.

    The full smlib can be found here:
    https://github.com/bcserv/smlib/tree...ipting/include
    __________________
    Developer of the German Games Community
    My Website

    Notable Projects:
    Event Item Spawner | Scissors, Rock, Paper for ZephStore
    tVip | Smart Link Remover
    PLG & GGC - CS:GO Roleplay

    and countless more...

    I can make a helicopter shoot missles if you want me to...
    Totenfluch 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 09:04.


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