Raised This Month: $32 Target: $400

[TF2] Advanced Armor v1.9.7 w/Updater

Post New Thread Reply   
Thread Tools Display Modes
Veteran Member
Join Date: Apr 2012
Plugin ID:
Plugin Version:
Plugin Category:
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Adds Armor to TF2, but with more options!
    Old 12-14-2013 , 13:52   [TF2] Advanced Armor v1.9.7 w/Updater
    Reply With Quote #1

    This plugin recreates Armor for TF2


    -Customize how much Maximum armor each class gets

    -Customize how much Armor regenerates per class

    -Customize how much Armor ammo packs give via percentage

    -Customize the maximum amount of Armor admins can give to players via Set Armor command

    -Set whether players start will full Armor, half, or zero!

    -Customize how much armor is given by Engineers metal via Wrenches and Gunslinger.

    -Set what type of Armor each class gets!

    -Customize how much damage each of the types of Armor absorbs.

    -Set whether you want Armor to regenerate or not!

    -Set whether you want Ammo packs, Dispensers, Engie Wrenches, any combination of the 3, or all of them!

    -Set Dispenser Armor healing interval and how much armor it can heal per interval!

    -Spectators can see other player's Available armor!

    -Set which team can have armor or not, Perfect for VS. Saxton Hale or Custom MVM servers!

    -Players can customize what kind of Armor hud they want; available in 3 styles using sm_armorhud!
    ~Available in....
    =Generic FPS Style: Armor: #/Max Armor: #
    =DOOM Style: Armor: #/#
    =Quake Style: Armor: #
    =New Style: Armor: (#) | Max Armor: (#)

    -Player's preferred armor huds are saved onto clientprefs! No more typing !armorhud every map change!

    -Update February 26, 2014; Now with Updater built in!

    -Players can change the color of their armor hud too!

    -Now with armor sounds!

    PHP Code:
    sm_setarmor <target> <0-setarmor max cvar> ; default flag is kick.
    sm_armorhud Brings up a menu that let's players select their armor hud.
    sm_armortype - let'
    s admins set player(sarmor type.
    sm_armorhudparams <x-coordinates> <y-coordinates> ; let's a player set the Armor HUD coordinates and saves it onto clientprefs.
    sm_armorhudcolor <Red:0-255> <Green:0-255> <Blue:0-255> ; obviously lets a player change the armor HUD color and saves it into clientprefs :)
    sm_armorhelp - brings up a help menu!
    armoron - equips armor if armor was unequipped.
    armoroff - unequips armor 
    PHP Code:
     * Returns the Armor Type of a client. 
     * @param client    Client index. 
     * @return    armortype. 
    native int GetArmorType(int client); 
     * Sets the Armor Type of a client. 
     * @param client    Client index. 
     * @param type        armor type. 
    native void SetArmorType(int clientint type); 
     * Returns the Maximum armor a client can hold. 
     * @param client    Client index. 
     * @return    Max Armor. 
    native int GetMaxArmor(int client); 
     * Sets the Maximum armor a client can hold. 
     * @param client    Client index. 
     * @param maxarmor    Max Armor Amount. 
    native void SetMaxArmor(int clientint maxarmor); 
     * Returns the current armor of a client. 
     * @param client    Client index. 
     * @return    Current Armor. 
    native int GetCurrentArmor(int client); 
     * Set the current armor of a client. 
     * @param client    Client index. 
     * @param armount    Armor Amount 
    native void SetCurrentArmor(int clientint armount); 
     * Returns the damage resistance of a clients armor. 
     * @param client    Client index. 
     * @return    damage resistance float. 
    native float GetArmorDamageResistance(int client); 
     * Sets the damage resistance of a clients (for use with armor). 
     * @param client    Client index. 
     * @param Float:dmgfloat    number that will be multiplied with damage and subtracted to armor. 
     * Good example of usage would be SetArmorDamageResistance(client, 0.99); 
     * 99% would mean that only 1% of the damage will go to player's health while the 99% goes to armor. 
    native void SetArmorDamageResistance(int clientfloat dmgfloat); 
     * Returns if a client is near a dispencer/being healed by dispenser. 
     * @param client    Client index. 
     * @return    true if near a dispenser. 
    native bool IsNearDispenser(int client); 
     * reads a player's armor and gives an auditory sound 
     * @param client    Client index. 
     * @return        audio of armor amount 
    native void ReadClientArmor(int client); 
    PHP Code:
    "sm_adarmor_enabled""1""Enable Advanced Armor plugin" 
    "0""switches between Timer HUD and OnPreThink, 0 = 0.2 second timer, and 1 puts the HUD on PreThink control" 
    "1""Enable getting armor from ammo" 
    "1""Enables bots to have armor" 
    "1""Enables sounds when getting/losing armor" 
    "1""if damage depletes armor, transfer the rest of the damage to the player's health" 
    "2.5""chance between 1.0 and 10.0 for Life armor to activate. The lower the decimal, the higher chance of the armor activating for players" 
    "3""chance between 1 and 10 for Luck armor to activate. The lower the integer, the higher chance of the armor working for players" 
    "1""Enable getting armor from engineer's metal" 
    "1""Enable HUD" 
    "1""Let's players destroy their own armor by damaging themselves" 
    "0""allows players to destroy ubered or bonked player's armor while invulnerable" 
    "0""allows crit damage to ignore armor" 
    "1""Let's players change their HUD parameters with sm_armorhudparams" 
    "1""Let's players change their HUD color with sm_armorhudcolor" 
    "1""Enable players to spawn with armor, 1 = full armor, 2 = half, 0 = none" 
    "0""Enables armor regen" 

    "1""Enable/Disable Armor Voice, also prevents download of voice files"
    "1""Enables armor from dispensers" 
    "0.0""multiplier of how much armor level 1 dispensers will heal. Leave at 0.0 if you want level 1 dispensers to repair at sm_adarmor_dispenser_to_armor rate"
    "0.50""multiplier of how much armor level 2 dispensers will heal. Leave at 0.0 if you want level 2 dispensers to repair at sm_adarmor_dispenser_to_armor rate"
    "1.0""multiplier of how much armor level 3 dispensers will heal. Leave at 0.0 if you want level 3 dispensers to repair at sm_adarmor_dispenser_to_armor rate" 
    "1""Enables armor for BLU team" 
    "1""Enables armor for RED team" 
    1.9.3"Advanced Armor version" 
    "50""sets how much max armor scout will have" 
    "200""sets how much max armor soldier will have" 
    "150""sets how much max armor pyro will have" 
    "120""sets how much max armor demoman will have" 
    "300""sets how much max armor heavy will have" 
    "60""sets how much max armor engineer will have" 
    "100""sets how much max armor medic will have" 
    "50""sets how much max armor sniper will have" 
    "100""sets how much max armor spy will have" 
    "6""armor regen per second for scout" 
    "8""armor regen per second for soldier" 
    "8""armor regen per second for pyro" 
    "7""armor regen per second for demoman" 
    "10""armor regen per second for heavy" 
    "6""armor regen per second for engineer" 
    "7""armor regen per second for medic" 
    "6""armor regen per second for sniper" 
    "7""armor regen per second for spy" 
    "10""converts metal, from engineer, to armor for teammates" 
    "5""multiplies with sm_metaltoarmor to reduce metal cost to repair teammates armor, use in conjuction with sm_metaltoarmor" 
    "0.25""give armor from small ammo packs by multiplying it with the players max armor they can get" 
    "0.50""give armor from med ammo packs by multiplying it with the players max armor they can get" 
    "1.0""give armor from full ammo packs by multiplying it with the players max armor they can get" 
    "1""gives x amount of armor from dispensers per rate from sm_adarmor_dispenser_time" 
    "0.2""amount of rate/time dispensers will give armor" 
    "999""highest armor that admins can give armor to players" 
    "0.3""how much damage should Light Armor absorb" 
    "0.6""how much damage should Medium Armor absorb" 
    "0.8""how much damage should Heavy Armor absorb" 
    "0.25""how much damage should Luck Armor absorb" 
    "1""ArmorType for Scout; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "3""Armor Type for Soldier; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "2""Armor Type for Pyro; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "2""Armor Type for Demoman; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "3""Armor Type for Heavy; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "2""Armor Type for Engineer; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "2""Armor Type for Medic; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "1""Armor Type for Sniper; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "2""Armor Type for Spy; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
    "60.0""how many times the advert will bitch at players per second" 
    5/9/15 - version 1.9.7 - completely converted code to new syntax, using new methodmaps as provided by SourceMod.
    8/6/14 - version 1.9.4-1 - Small improvement of code and some updating.
    5/28/14 - version 1.9.3 - added Auditory reading of armor values using the HEV Suit from Half Life + natives for reading a client's armor value.
    5/15/14 - version 1.9.2 - FINALLY added so that touching a resupply locker gives full Armor
    4/15/14 - version 1.9.1 - fixed bug with natives, now they should fully function.

    4/15/14 - version 1.9.0 - Separated armor check function into 3 separate functions, added command that lets admins change player(s) Armor Type on the fly, and added natives for plugins/whatever.

    4/14/14 - version 1.8.3+4 - put HUD code into one function for easier updating, Updated Armor Type using enums, and various code improvements.

    4/13/14 - version 1.8.2 - added !reloadarmor command for lazy server operators like me, to reload the .cfg, Added Special armor classes like bullet, blast, and asbestos armor but they are currently non-functional, will function in the future hopefully, added Luck armor that has gives a player a chance of taking reduced damage, and chance armor which will block a fatal hit, added a cvar that let's the armor HUD update via a 0.2 second timer or using OnPreThink, finally fixed the medic healing giving armor glitch so now ONLY dispenser healing can give armor.

    3/19/14 - version 1.8.1 - added "armoron" and "armoroff" commands to allow players to (un)equip armor at will, Updated Dispenser code so that Dispenser levels will affect armor healing rate, added cvar to allow if damage completely destroys armor and transfers the rest of the damage to player health

    3/15/14 - version 1.8.0 - fixed up getting Armor from Ammo a bit, cleaned up code a bit too, added cvar to allow bots to have armor or not, added sound effects when gaining/losing armor and cvar to enable/disable those sounds, fixed uber healing back medic's armor with associated cvar to re-allow that if wanted.

    3/8/2014 - version 1.7.4 - Fixed Mediguns healing armor glitch, added SetColor to cookies!

    3/2/2014 - version 1.7.3 - Added a cvar that allows crit damage to pierce armor, added sm_armorhudparams to save to clientprefs, added a help menu, added an advertisement timer with cvar to control the amount of times it bitches, added sm_armorhudcolor that allows players to change the color of their HUD, refined the armor-damage calculation!

    2/26/2014 - version 1.7.2 - Fixed a minor glitch with damage calculation on armor, added sm_armorhudparams to allow players to change the place of the Armor HUD text, refined Engineers Wrench-Armor fix code, added cvar that (dis)allows ubered+bonked players to lose armor if they are damaged while invulnerable.

    2/26/2014 - version 1.7 - added Updater support + minor fixes.

    2/25/2014 - version 1.6 - added ability for dispensers to heal armor, added team restriction cvars for armor, added custom armor hud styles for players to pick from, added clientprefs so players can save their hud settings, fixed glitch involving Spy's dead ringer, added for spectators to view observed player's armor values, and improved Engineer's Wrench armor fix to use less metal, added cvar to allow armor to be damage by the wearing player.

    2/23/2014 - version 1.5 - renamed plugin to advanced armor, added ability for armor to regenerate, regenerate per class, and cvar to disable armor regenerating, changed Armor on Spawn cvar to either Full, Half, or No Armor on spawn.

    2-21-2014 - version 1.4 - added bool to allow full armor on spawn and some various bugfixes.

    2-21-2014 - version 1.3 - added Admin command that sets armor on players, added so ammo packs can give armor with bool to turn it off or on.

    1-4-2014 - version 1.1 - made it independent from TF2ItemsInfo and changed the Armor HUD to be more noticeable.

    12-14-2013 - release - version 1.0
    BitBucket repo @ - https://bitbucket.org/assyrian/tf2-a...d-armor-plugin
    Attached Files
    File Type: zip sound.zip (492.2 KB, 534 views)
    File Type: sp Get Plugin or Get Source (advanced_armor.sp - 610 views - 60.2 KB)
    File Type: inc advanced_armor.inc (2.2 KB, 602 views)
    File Type: smx advanced_armor.smx (36.6 KB, 629 views)

    Last edited by nergal; 05-09-2015 at 11:14. Reason: v1.9.41
    nergal is offline
    Veteran Member
    Join Date: Apr 2012
    Old 12-14-2013 , 13:54   Re: [TF2] Engineer-aided Armor
    Reply With Quote #2

    Planned Updates

    Armor model on equip

    Last edited by nergal; 02-26-2014 at 08:08.
    nergal is offline
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 12-14-2013 , 14:36   Re: [TF2] Engineer-aided Armor
    Reply With Quote #3

    Just use GetClientWeapon instead of using TF2ItemsInfo
    ReFlexPoison is offline
    Senior Member
    Join Date: May 2013
    Old 12-14-2013 , 15:31   Re: [TF2] Engineer-aided Armor
    Reply With Quote #4

    Great Job! Now make the jacket model above appear on armored player and this will be the best plugin ever.
    edit: ;~;

    Last edited by Marverlous; 12-15-2013 at 18:14.
    Marverlous is offline
    Veteran Member
    Join Date: Apr 2012
    Old 12-14-2013 , 19:31   Re: [TF2] Engineer-aided Armor
    Reply With Quote #5

    Originally Posted by Marverlous View Post
    Great Job! Now make the jacket model above appear on armored player and this will be the best plugin ever.
    I wish I knew how to do that.
    nergal is offline
    Senior Member
    Join Date: Jul 2012
    Location: NYC
    Old 12-21-2013 , 20:26   Re: [TF2] Engineer-aided Armor
    Reply With Quote #6

    Can you possibly make a video?
    Blackglade is offline
    Happy DODs player
    AlliedModders Donor
    Join Date: Sep 2009
    Old 12-22-2013 , 14:48   Re: [TF2] Engineer-aided Armor
    Reply With Quote #7

    Will use this on my melee server
    Happy DODs player is offline
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 12-22-2013 , 15:43   Re: [TF2] Engineer-aided Armor
    Reply With Quote #8

    ha! tfc ftw.

    but seriously, someone better rewrite tf2ii.
    I couldn't do it within next 53 months.
    Leonardo is offline
    Senior Member
    Join Date: Dec 2013
    Old 01-03-2014 , 16:24   Re: [TF2] Engineer-aided Armor
    Reply With Quote #9

    I found a mistake ..... map exchange when the plugin is not working and disables high .... more I think it is a problem that the plugin appears
    vadia111 is offline
    Veteran Member
    Join Date: Apr 2012
    Old 01-03-2014 , 19:47   Re: [TF2] Engineer-aided Armor
    Reply With Quote #10

    Originally Posted by vadia111 View Post
    I found a mistake ..... map exchange when the plugin is not working and disables high .... more I think it is a problem that the plugin appears
    lolwut? dat Engrish
    Sorry, I cannot understand what you are saying to me. I cannot fix your problem if I do not understand.

    Last edited by nergal; 01-03-2014 at 19:47.
    nergal is offline

    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 08:43.

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