Raised This Month: $12 Target: $400
 3% 

[TF2] Custom Backpack Viewer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Plugin ID:
4397
Plugin Version:
1.1.3
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    Allows players to choose which backpack viewer they wish to use to view other players' backpacks
    Old 10-29-2014 , 00:41   [TF2] Custom Backpack Viewer
    Reply With Quote #1

    [TF2] Custom Backpack Viewer

    v1.1.3

    Description:
    Implements the !bp (and !backpack) command which is ubiquitous across TF2 trade servers, but allows players to customize their viewer preference with the !settings menu. By default it supports Backpack.tf, Bazaar.tf, Steam, TF2B, and TF2Items.

    You can add your own viewers if your preference isn't already implemented. The backpack_viewer.txt file (which goes under /addons/sourcemod/data) defines the available viewers. If you wish to customize it, copy it to /addons/sourcemod/configs first or else it may be overwritten when you update the plugin. Each viewer is defined in a section like this:

    Code:
    "internalname" // The internal name of the viewer, used in the backpack_viewer_default cvar and the client's cookie
    {
        "name"    "Viewer Name" // The displayed name of the viewer
        "url"     "http://example.com/backpack/{ID}" // The URL to open. {ID} will be replaced with the target's Steam ID, {NAME} will be replaced with the target's name, and {SERVER_IP} will be replaced with the server's IP (or anonymous if backpack_viewer_allow_tracking is off)
        "idtype"   "3" // The type of Steam ID to replace {ID} with
    }
    Valid values for idtype are 0 (the format shown in the status command), 1 (STEAM_0:0:23071901 format), 2 ([U:1:46143802] format), and 3 (76561198006409530 format).

    This plugin requires SourceMod version 1.6.3 or later.

    Commands:
    sm_backpack - View the backpack of the player named in the command arguments, or the player you're aiming at. Opens a menu if no match.
    sm_bp - Same as above

    Cvars:
    backpack_viewer_version - plugin version
    backpack_viewer_auto_update (default 1) - enables automatic updating (has no effect if Updater is not installed)
    backpack_viewer_default (default "backpacktf") - the default viewer to use for clients who haven't customized their preference (value should be the internal name of one of the available viewers)
    backpack_viewer_allow_tracking (default 1) - if enabled, your server's IP will be sent to backpack viewer sites if the site being used is configured to receive it. No built-in viewers are configured to receive your server IP, so this is mainly for a custom viewer you might have for your community.

    The internal names of the built-in viewers are backpacktf, bazaar, steam, tf2b, and tf2items.

    Installation:
    Extract backpack_viewer.zip, upload its contents to your /addons/sourcemod directory, and reboot your server or type "sm plugins load backpack_viewer" into your console or rcon.

    Auto Update:
    Install Updater. The plugin will be auto-updated according to your Updater settings. It'll work without Updater.

    Changelog:
    • v1.0.0 (10/29/12)
      • Initial release

    Download Plugin (backpack_viewer.zip)
    __________________

    Last edited by Dr. McKay; 07-07-2022 at 19:19.
    Dr. McKay is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 10-29-2014 , 00:41   Re: [TF2] Custom Backpack Viewer
    Reply With Quote #2

    Completely awesome.

    EDIT: I'm not sure that any exist, but are there plans to support sites that may modify the steam ID's in such a way? For example, a site that replaces STEAM_0:0:23071901 with STEAM_0_0_23071901, or a site that may change [U:1:46143802] to something like U_1_46143802 ?
    __________________

    Last edited by ddhoward; 10-29-2014 at 00:48.
    ddhoward is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 10-29-2014 , 00:47   Re: [TF2] Custom Backpack Viewer
    Reply With Quote #3

    Quote:
    Originally Posted by ddhoward View Post
    Completely awesome.

    EDIT: I'm not sure that any exist, but are there plans to support sites that may modify the steam ID's in such a way? For example, a site that replaces STEAM_0:0:23071901 with STEAM_0_0_23071901, or a site that may change [U:1:46143802] to something like "U_1_46143802".

    Forgive me if this makes no sense at all, as I have no idea how regular expressions work, but such a thing seems like it would be a good job for regex?
    I see no reason to support sites that don't exist.
    __________________
    Dr. McKay is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 10-29-2014 , 11:44   Re: [TF2] Custom Backpack Viewer
    Reply With Quote #4

    I released version 1.1.0. The only change is that the built-in TradeRep viewer (which is owned by myself) receives your server's IP for use in analytics. You can disable this feature by turning off backpack_viewer_allow_tracking.
    __________________
    Dr. McKay 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 11:05.


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