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

[Any][SQL]VIP-Manager 2.2.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ShadowManGer
Member
Join Date: May 2013
Plugin ID:
4295
Plugin Version:
2.2.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Add VIPs for a specified duration to your server.
    Old 08-02-2014 , 13:56   [Any][SQL]VIP-Manager 2.2.1
    Reply With Quote #1

    Description

    Add VIPs for a specified duration to your server.
    VIPs are stored in the "vips" table in your database.

    Features
    • Automatic VIP removing
    • Add, substract or set the time for VIPs
    • Easy ingame VIP editing

    Installation
    Spoiler


    ConVars
    sm_vipm_authid_format Sets which SteamId format should be used. | Engine (default), Steam2, Steam3, Steam64

    Commands

    For all commands you need the admin root flag!
    sm_vipm | Lists all commands.
    sm_vipm_add <"name"> <minutes> | Add a VIP.
    sm_vipm_rm <"name"> | Remove a VIP.
    sm_vipm_time <set|add|sub> <"name"> <minutes> | Change the duration for a VIP.
    sm_vipm_check | Checks for expired VIPs.

    Adding VIPs
    Spoiler


    Forwards

    You want to create your own plugin which needs to react to changes of VIPs?
    No problem! Just include the "VIP-Manager.inc" file into your plugin and use these forwards.
    PHP Code:
    forward void OnVIPAdded(int adminchar[] namechar[] steamIdint minutes);
    forward void OnVIPDurationChanged(int adminchar[] namechar[] steamIdchar[] modeint oldDurationint duration);
    forward void OnVIPRemoved(int adminchar[] namechar[] steamIdchar[] reason); 
    Changelog
    Spoiler


    Source Code
    The source code is available under GitLab.
    Feel free to fork and edit for your purpose!

    Feedback
    Please give me your feedback. I'm open for new ideas.
    You can create a new issue on GitLab
    Attached Files
    File Type: inc VIP-Manager.inc (1.5 KB, 978 views)
    File Type: sp Get Plugin or Get Source (VIP-Manager.sp - 2516 views - 19.3 KB)

    Last edited by ShadowManGer; 07-02-2017 at 07:45. Reason: Release 2.2.1
    ShadowManGer is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-02-2014 , 20:04   Re: [Any][SQL]VIP-Manager
    Reply With Quote #2

    Few tips:

    Instead of using a method that checks if the client using the 'VIP_Help' is a client over 0 to check if it's console, just use the 'ReplyToCommand' function.

    Example:
    Code:
    public Action:VIP_Help(client, args)
    {
    	ReplyToCommand(client, "vipm_help | Show this text.");
    	ReplyToCommand(client, "vipm_add <name> <days> [\"SteamID\"] | Adds a new VIP for give days.");
    	ReplyToCommand(client, "vipm_rm <name> | Remove a VIP.");
    	ReplyToCommand(client, "vipm_time <set|add|sub> <\"name\"> <time> | Change time of a VIP.");
    	ReplyToCommand(client, "vipm_check | Checks for outdated VIPs.");
    	ReplyToCommand(client, "[VIP-Manager] by %s (Version %s)", Author, Version);
    	return Plugin_Handled;
    }
    Same with stuff like line 89 & 90...

    Code:
    ReplyToCommand(client, "[VIP-Manager] Starting VIP check!");
    --

    You really don't need to create the function to check if a string is empty, just use the 'StrEqual' function and check if it's empty that way.

    Code:
    if (StrEqual(query, "")
    {
    	PrintToServer("Query is empty!");
    	continue;
    }
    Drixevel is offline
    ShadowManGer
    Member
    Join Date: May 2013
    Old 08-02-2014 , 20:17   Re: [Any][SQL]VIP-Manager
    Reply With Quote #3

    @r3dw3r3w0lf

    Thank you!
    ReplyToCommand make it easier for me.
    ShadowManGer is offline
    kitty0725
    Junior Member
    Join Date: Jul 2014
    Old 09-14-2014 , 04:57   Re: [Any][SQL]VIP-Manager
    Reply With Quote #4

    Can you show me the example of the mysql?

    This?
    "vip-manager"
    {
    "driver" "mysql"
    "host" "localhost"
    "database" "vip-manager"
    "user" "username"
    "pass" "password"
    }

    Last edited by kitty0725; 09-14-2014 at 04:57. Reason: forgot to add it
    kitty0725 is offline
    ShadowManGer
    Member
    Join Date: May 2013
    Old 09-15-2014 , 09:12   @kitty0725
    Reply With Quote #5

    My plugin currently use the default SQL connection.

    So you have to configure the default connection.
    Code:
    "default"
    {
            "driver"			"mysql"
    	"host"			"localhost"
    	"database"			"vip-manager"
    	"user"			"username"
    	"pass"			"password"
    }
    ShadowManGer is offline
    DJ Data
    SourceMod Donor
    Join Date: Dec 2012
    Location: Switzerland
    Old 09-16-2014 , 19:55   Re: @kitty0725
    Reply With Quote #6

    Quote:
    Originally Posted by ShadowManGer View Post
    My plugin currently use the default SQL connection.

    So you have to configure the default connection.
    Code:
    "default"
    {
            "driver"			"mysql"
    	"host"			"localhost"
    	"database"			"vip-manager"
    	"user"			"username"
    	"pass"			"password"
    }
    You have to get this fixed ASAP. Make it use its own.
    __________________
    SourcePawn Coding Level: Novice
    DJ Data is offline
    qiuhaian
    Senior Member
    Join Date: Nov 2009
    Old 09-17-2014 , 21:23   Re: [Any][SQL]VIP-Manager
    Reply With Quote #7

    Nice work!
    I have a suggestion,Whether you can customize the vip's flag? not only the flag "a".


    other,don't Delete the outdate vip,can you change the outdate vip's flag "a" to customize flag,such as "s".

    Thanks a million.

    sorry for may bad english

    Last edited by qiuhaian; 09-17-2014 at 21:25.
    qiuhaian is offline
    ShadowManGer
    Member
    Join Date: May 2013
    Old 11-22-2014 , 18:09   Update news!
    Reply With Quote #8

    Hey guys,
    sorry for my lack of activity, but i had a lot of things to do.

    I just want to tell you that i'm currently working on the new version 1.1 which contains following features:
    • Option to handle VIPs offline
    • Option to change the VIP flag
    • Option to store VIPs in an admin group
    • Moving custom SQL queries into a key value file
    • Possibility to add VIPs with only special characters in its name

    If you have some suggestions or have found some bugs, then let me know that
    ShadowManGer is offline
    TUSK3N1337
    SourceMod Donor
    Join Date: Dec 2013
    Location: Sweden
    Old 11-23-2014 , 05:58   Re: [Any][SQL]VIP-Manager
    Reply With Quote #9

    Is this working with sourcebans?
    __________________
    TUSK3N1337 is offline
    Send a message via Skype™ to TUSK3N1337
    Trosty
    Member
    Join Date: Oct 2011
    Location: Romania
    Old 11-23-2014 , 08:47   Re: [Any][SQL]VIP-Manager
    Reply With Quote #10

    You can add an web page to show vip members and how much time they have?
    __________________


    -


    You need a WebDesigner? Hire me!
    Trosty is offline
    Send a message via Skype™ to Trosty
    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 22:39.


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