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

[TF2] Building Hats


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Plugin ID:
4271
Plugin Version:
1.9
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    190 
    Plugin Description:
    Applies a hat to a buildable upon building
    Old 07-08-2014 , 15:27   [TF2] Building Hats
    Reply With Quote #1

    TF2 Building Hats

    What is it?
    Whenever you build a sentry it will get a hat and the hat will remain through upgrades


    Commands:

    sm_bhats_reloadconfig : Reload buildinghats.cfg [Default acces: ROOT]
    sm_buildinghats : Would you like your buildables without or with hats? [Default acces: Everyone]
    sm_rerollhat : Rerolls the hats of your current active buildings [Default acces: Everyone]
    sm_buildinghateffect : Allows you to choose the unusual effect of your buildings hats [Default acces: ROOT]

    Cvars:
    sm_bhats_version Plugin Version
    sm_bhats_enabled (default: 1.0) Enable/disable plugin
    sm_bhats_unusualchance (default: 0.1) Chance of unusual effect (0.1 = 10% chance)
    sm_bhats_rollcooldown (default: 30 seconds) Hat reroll cooldown

    Overrides:
    sm_buildinghats_access : Is user allowed to receive hats on their buildings? [Default acces: Everyone]
    sm_buildinghats_unusuals : Is user allowed to receive unusuals on their buildings hats? [Default acces: Everyone]

    The config:
    The config must include 4 things.
    - The modelpath of the model you want your sentry to wear
    - The offset (z offset) this offset the hat up/down and is pretty tedious to get just right
    - The modelscale of the hat (1.0 is normal size)
    - The animation. (use default to use default animation)
    like this:
    PHP Code:
    "Building hats"    //Don't touch this
    {
        
    "0"
        
    {
            
    "modelpath"        "models/player/items/all_class/dueler_spy.mdl"
            "offset"        "-4.0"
            "modelscale"    "1.0"
            "animation"        "default" 
    //Don't change animation
        
    }

    The config that comes with the plugin contains 41 unique hats because i was too lazy to type in more.
    Oh, and the config goes to sourcemod/configs/

    Chaneglog:
    1.0 - Initial Release
    1.1:
    - Added sm_buildinghats cmd to toggle whether you want hats on your buildings on/off
    - Added sm_buildinghats_access override
    1.2 - Fixed an error model appearing sometimes
    1.3 - Fixed an error model appearing sometimes (For realz this time!)
    1.4 - Fixed an error model appearing sometimes (Peli confirmed worst bugfixer of the year)
    1.5 - Fixed sm_bhats_reloadconfig not emptying the array.
    1.6:
    - Added Animation support
    - Added Ability to restrict unusual effects (Untested)
    - Fixed when a player that does not have access to this plugin builds a building and a player with access to this plugin repairs it or upgrades it, the building gains a hat.
    - Fixed buildings having a chance to gain an unusual every upgrade. (Untested)
    1.7 - Fixed buildings losing their unusual effect after upgrade.
    1.8:
    - Added more Unusual effects
    - Added sm_rerollhat command, it has a use cooldown that can be controlled with sm_bhats_rollcooldown
    - Added sm_buildinghateffect command, Allows users with ROOT acces to change the unusual effect on their buildings.
    - All of the above commands are overridable as usual.
    1.9: - Hats enabled by default for new players
    2.0: - Renamed reserved keywords

    Credits:
    - MasterOfTheXP: Helped me out with stringtables and loadsa other things
    - Arkarr: Teached me Adt_arrays
    - island55: Helped me test some fixes
    Attached Files
    File Type: cfg buildinghats.cfg (6.3 KB, 3475 views)
    File Type: sp Get Plugin or Get Source (buildinghats.sp - 3689 views - 24.8 KB)
    File Type: smx buildinghats.smx (18.7 KB, 2580 views)
    __________________

    Last edited by Pelipoika; 02-23-2016 at 17:04. Reason: Update
    Pelipoika is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 07-08-2014 , 15:37   Re: [TF2] Building Hats
    Reply With Quote #2

    Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.

    Last edited by Sreaper; 07-08-2014 at 15:40.
    Sreaper is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 07-08-2014 , 15:59   Re: [TF2] Building Hats
    Reply With Quote #3

    Not a fan of hats but this is amazing!
    Drixevel is offline
    Pelipoika
    Veteran Member
    Join Date: May 2012
    Location: Inside
    Old 07-08-2014 , 16:58   Re: [TF2] Building Hats
    Reply With Quote #4

    Quote:
    Originally Posted by Sreaper View Post
    Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.
    Later
    __________________
    Pelipoika is offline
    Horsedick
    AlliedModders Donor
    Join Date: Sep 2011
    Old 07-08-2014 , 18:09   Re: [TF2] Building Hats
    Reply With Quote #5

    Quote:
    Originally Posted by Sreaper View Post
    Cool. Mind adding an override feature for defining which flag is able to have sentry hats? Preferably with an option to enable/disable sentry hats for your own buildings as well.
    I 2nd this, very nice thing to have but it almost certainly would be best suited for flag usage and perhaps toggle on/off?
    Horsedick is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 07-08-2014 , 22:01   Re: [TF2] Building Hats
    Reply With Quote #6

    One of these hats in your config is coming out as an error model. Not sure how to tell.
    404UserNotFound is offline
    robotortoise
    Senior Member
    Join Date: Nov 2013
    Old 07-08-2014 , 22:21   Re: [TF2] Building Hats
    Reply With Quote #7

    Oh my god this is amazing.

    Now I need one that adds tiny hats to rockets, stickies, and those new Robots that were added.


    Also, is there a limit to how big the hat cfg can be? I wonder if I could comb through the model list and just add every hat.
    __________________
    -Robotortoise [Palutena's Bro]

    If you ever need help with Wii/Gamecube/DS sounds/music/ect., I'm your man!

    Contact me via Steam

    I don't bite.


    How to loop and compress .wav files

    Me and my friends' server

    Last edited by robotortoise; 07-08-2014 at 22:28.
    robotortoise is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 07-08-2014 , 22:32   Re: [TF2] Building Hats
    Reply With Quote #8

    Ok so I uncommented the model name printing lines and found this:

    Code:
    smodel: models/player/items/all_class/all_class_reddit_alt_scout_hat.md
    strModelPath: 
    models/player/items/all_class/all_class_reddit_alt_scout_hat.md
    T
    The models are ".mdl" in the config so I'm wondering if their file names are too long.
    404UserNotFound is offline
    SephirothSG
    SourceMod Donor
    Join Date: Jun 2013
    Old 07-09-2014 , 02:00   Re: [TF2] Building Hats
    Reply With Quote #9

    How easy would it be to grab the builders current hat and add it to the sentry instead of just pulling a hat from the config?
    SephirothSG is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 07-09-2014 , 03:26   Re: [TF2] Building Hats
    Reply With Quote #10

    Quote:
    Originally Posted by SephirothSG View Post
    How easy would it be to grab the builders current hat and add it to the sentry instead of just pulling a hat from the config?
    I like this idea. Please implement that too if you wouldn't mind.

    Last edited by Sreaper; 07-09-2014 at 03:26.
    Sreaper 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 21:19.


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