Raised This Month: $7 Target: $400
 1% 

[ANY] Spray Manager (1.5.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Plugin ID:
3831
Plugin Version:
1.5.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    23 
    Plugin Description:
    Allows to see who owns each spray, banning players from spraying and anti spray-on-spray for easier administration of sprays.
    Old 08-09-2013 , 12:00   [ANY] Spray Manager (1.5.1)
    Reply With Quote #1

    Spray Manager by shavit
    The ultimate spray manager

    Version 1.5.0

    Description:
    Spray Manager is a plugin that was made for my server and has some useful features.

    Features:
    Spray Manager includes features that can help you in a case of an inappropriate spray, or just a spray that you don't want to see.

    Commands:
    * All the commands can be accessed through the admin menu under Player Commands in-case that adminmenu.smx is loaded.
    ** All the commands can be used in the chat as !command or /command (default chat triggers) instead of sm_command.

    sm_sprayban or sm_sban - Usage: sm_sprayban <target>
    Bans a player from spraying.
    Needed access: Ban

    sm_offlinesprayban or sm_offlinesban - Usage: sm_offlinesprayban <steamid> [name]
    Spray ban a player even if he's offline. In case that he's online, he will be automatically spray banned in-game w/o reconnecting.

    sm_offlinesban "STEAM_0:0:59898856" "shavit" for example would spray ban me.
    Needed access: Ban

    sm_sprayunban or sm_sunban - Usage: sm_sprayunban <target>
    Unbans a spray banned player from spraying.

    Needed access: Unban

    sm_sbans or sm_spraybans - Usage: sm_spraybans
    Unbans a spray banned player from spraying.

    Needed access: Generic

    sm_allsbans or sm_offlinesbans - Usage: sm_allsbans
    Shows a list of all spray banned players, even if they're not in-game.
    After selecting someone, you will be able to remove his spray ban if you have the "Unban" access.
    Needed access: Generic

    Screenshots of the menu


    Admin Menu Support:
    This plugin comes with support for the basic admin menu plugin that comes with SourceMod, and include its commands in the Player Commands category.

    Example:
    Spoiler


    Requirements:
    MetaMod: Source 1.10 developer snapshot+
    SourceMod 1.5 developer snapshot+
    The basic adminmenu.smx plugin that comes with SourceMod.
    The basic Client Preferences (clientprefs) extension & plugin that comes with SourceMod.
    SMLib to compile.

    Installation:


    Add the "spraymanager" field to addons/sourcemod/configs/databases.cfg

    MySQL:
    Code:
    "spraymanager"
        {
            "driver"        "default"
            "host"        "ip/hostname"
            "database"        "database"
            "user"        "username"
            "pass"        "password"
            "port"        "3306"
        }
    SQLite:
    Code:
    "spraymanager"
        {
            "driver"        "sqlite"
            "database"        "spraymanager"
        }
    Example:
    Spoiler


    Planned Features:
    MySQL/SQLite support. - Done!

    Add sm_allsbanned/sm_allspraybanned command that will display a menu that shows who got spray banned, even if they're offline.
    - Done!
    Add sm_offlinesban/sm_offlinesprayban command that you can ban a SteamID from spraying even if the player is not playing right now.
    - Done!

    ConVars:
    Code:
     // ConVars for plugin "spraymanager.smx"
    Code:
    // "Spray Manager" version
    // -
    sm_spraymanager_version "1.2"
    
     // Enable "Spray Manager"?
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_spraymanager_enabled "1"
    
    // Where players will see the owner of the spray that they're aiming at?
    // 0 - Disabled
    // 1 - Hud hint http://i.imgur.com/R1AyN5h.jpg
    // 2 - Hint text (like sm_hsay) http://i.imgur.com/5TS4P4p.jpg
    // 3 - Center text (like sm_csay) http://i.imgur.com/NEhtie0.jpg
    // 4 - HUD (if supported by the game) (I can't post a screenshot, if someone runs it on a game that supports HUD please give me a screenshot)
    // 5 - Top left (like sm_tsay) http://i.imgur.com/m3o7YkL.jpg
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "5.000000"
    sm_spraymanager_textloc "1"
    
    // Prevent spray-on-spray overlapping?
    // If enabled, specify an amount of units that another player spray's distance from the new spray needs to be it or more, recommended value is 75.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    sm_spraymanager_overlap "0"
    
    // Which authentication identifiers should be seen in the HUD?
    // - This is a "math" cvar, add numbers for your likings. (Example: 1 + 4 = 5/Name + IP address)
    // 1 - Name
    // 2 - SteamID
    // 4 - IP address
    // -
    // Default: "1"
    // Minimum: "1.000000"
    sm_spraymanager_auth "1"
    * This config file is auto-created in srcds/mod/cfg/sourcemod with the name spraymanager.cfg.

    Developers' API:
    The plugin comes with an include file that you can easily use with other plugins.

    Natives:
    Code:
    /**
     * Ban a player from using sprays.
     * 
     * @param client                    Client index.
     * @param delete                    Delete the client's spray if it's there?
     * @error                    Throw error if client is invalid/already spray banned.
     * @noreturn
     */
    native SprayManager_BanClient(client, bool:delete = true);
    
    /**
     * Unban a spray banned player from using sprays.
     * 
     * @param client                    Client index.
     * @error                    Throw error if client is invalid/not banned.
     * @noreturn
     */
    native SprayManager_UnbanClient(client);
    
    /**
     * Check if the client is spray banned.
     * @param client                    Client index.
     * @error                    Throw error if client is invalid.
     * @return                 True if spray banned, false otherwise.
     */
    native SprayManager_IsBanned(client);


    Forwards:
    Code:
    /**
     * Called when a client gets spray banned.
     *
     * @param client        Client index
     *
     * @noreturn
     */
    forward SprayManager_OnBan(client);
    
    /**
     * Called when a client gets spray unbanned.
     *
     * @param client        Client index
     *
     * @noreturn
     */
    forward SprayManager_OnUnban(client);


    Example of usage:
    Code:
    #include <sourcemod>
    #include <spraymanager>
    
    #pragma semicolon 1
    
    public Plugin:myinfo = 
    {
        name = "[Spray Manager] Ban Check",
        author = "shavit",
        description = "Check if you are banned from spraying",
        version = "1.0",
        url = "not vgames"
    }
    
    public OnPluginStart()
    {
        RegConsoleCmd("sm_sbanned", Command_SBanned, "Are you spray banned?");
    }
    
    public Action:Command_SBanned(client, args)
    {
         ReplyToCommand(client, "\x04[Spray Manager]\x01 You are %s.",  SprayManager_IsBanned(client)? "\x07FF0000BANNED":"\x0700FFAANOT  BANNED");
        
        return Plugin_Handled;
    }
    Change Log:
    Code:
    1.5.1 -
    * Fixed an SQL syntax error, most likely fixed some stuff
    
    1.5.0 -
    + Added an option to choose what you wanna see in the HUD. (SteamID, IP, name or combine between them)
    
    1.4.0 -
    + Added a basic anti-spray-on-spray (anti-overlapping) feature that is disabled as default. Idea by AeroAcrobat/salsav91 and base code by MasterOfTheXP.
    
    1.3.1 -
    * Hotfix for error log spam when the (My)SQL server is unavailable for more than 5 times.
    (The max connections can be edited through the plugin but requires a recompile)
    
    1.3 -
    * SQLite error fix.
    
    1.2 -
    + Added offline spray ban list.
    + Added an option to spray un-ban players in the list.
    + Added sm_offlinesprayban/sm_offlinesprayban <steamid> [name] to manually spray ban players even if they're offline.
    * Minor bug fixes.
    
    1.1 -
    + Added MySQL/SQLite support
    + Now, when you spray ban a player the plugin is removing his spray immediatly.
    + Added a new parameter to the SprayManager_BanClient native.
    - Removed "Client Preferences" requirement.
    * Minor optimization.
    
    1.0 -
    Initial release
    Attached Files
    File Type: inc spraymanager.inc (1.5 KB, 1184 views)
    File Type: sp Get Plugin or Get Source (spraymanager.sp - 926 views - 29.6 KB)
    File Type: smx spraymanager.smx (28.6 KB, 1040 views)
    __________________
    retired

    Last edited by shavit; 12-23-2014 at 11:23.
    shavit is offline
    altair540
    Member
    Join Date: Dec 2012
    Old 08-09-2013 , 13:50   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #2

    Something in the admin menu item is added to control sprays.
    altair540 is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 08-09-2013 , 14:25   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #3

    Quote:
    Originally Posted by altair540 View Post
    Something in the admin menu item is added to control sprays.
    That's a feature of the plugin.
    __________________
    retired
    shavit is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 08-10-2013 , 00:28   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #4

    Are you aware that Spray Tracer can already do what your plugin has to offer?

    Last edited by Sreaper; 08-10-2013 at 00:28.
    Sreaper is offline
    FairyCosmo
    New Member
    Join Date: Aug 2013
    Old 08-10-2013 , 03:42   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #5

    Quote:
    Originally Posted by Sreaper View Post
    Are you aware that Spray Tracer can already do what your plugin has to offer?
    But in this plugin you can ban players from doing spray.
    FairyCosmo is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 08-10-2013 , 03:45   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #6

    Quote:
    Originally Posted by FairyCosmo View Post
    But in this plugin you can ban players from doing spray.
    For some reason I was thinking that Spray Trace handled sm_banspray. I meant to point out this plugin.
    However, Shavit your plugin is a nice plugin alternative. Thanks for sharing. :)

    Last edited by Sreaper; 08-10-2013 at 03:46.
    Sreaper is offline
    nomy
    Senior Member
    Join Date: Dec 2009
    Location: United Kingdom
    Old 08-10-2013 , 08:31   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #7

    Can you please add Steam ID support? So Admins can add/remove bans via console even if the player is not on server?

    Right now this plugin does what spraytrace and ban player's spray does but this has natives too.
    nomy is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 08-10-2013 , 09:45   Re: [ANY] Spray Manager (1.0)
    Reply With Quote #8

    Quote:
    Originally Posted by Sreaper View Post
    For some reason I was thinking that Spray Trace handled sm_banspray. I meant to point out this plugin.
    However, Shavit your plugin is a nice plugin alternative. Thanks for sharing.
    I never saw that plugin, well
    Quote:
    Originally Posted by nomy View Post
    Can you please add Steam ID support? So Admins can add/remove bans via console even if the player is not on server?

    Right now this plugin does what spraytrace and ban player's spray does but this has natives too.
    I will add this feature, don't worry.
    __________________
    retired
    shavit is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 08-10-2013 , 11:28   Re: [ANY] Spray Manager (1.1)
    Reply With Quote #9

    1.1 -
    + Added MySQL/SQLite support
    + Now, when you spray ban a player the plugin is removing his spray immediatly.
    + Added a new parameter to the SprayManager_BanClient native.
    - Removed "Client Preferences" requirement.
    * Minor optimization.

    Planned features for 1.2:
    Add sm_allsbanned/sm_allspraybanned command that will display a menu that shows who got spray banned, even if they're offline.
    Add sm_offlinesban/sm_offlinesprayban command that you can ban a SteamID from spraying even if the player is not playing right now.
    __________________
    retired
    shavit is offline
    butaford
    Member
    Join Date: Mar 2011
    Old 10-10-2013 , 02:44   Re: [ANY] Spray Manager (1.1)
    Reply With Quote #10

    Please make a translation file
    butaford 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 05:26.


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