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

[TF2] Advanced Armor v1.9.7 w/Updater


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
nergal
Veteran Member
Join Date: Apr 2012
Plugin ID:
3999
Plugin Version:
1.9.7
Plugin Category:
Gameplay
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

    Optional
    Updater

    Features
    -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!




    COMMANDS
    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 
    NATIVES
    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); 
    CVARS
    PHP Code:
    "sm_adarmor_enabled""1""Enable Advanced Armor plugin" 
         
    "sm_adarmor_hud_switch"
    "0""switches between Timer HUD and OnPreThink, 0 = 0.2 second timer, and 1 puts the HUD on PreThink control" 
     
    "sm_adarmor_fromammo"
    "1""Enable getting armor from ammo" 
     
    "sm_adarmor_allow_bots"
    "1""Enables bots to have armor" 
     
    "sm_adarmor_allow_sound"
    "1""Enables sounds when getting/losing armor" 
     
    "sm_adarmor_allow_dmg_overwhelm"
    "1""if damage depletes armor, transfer the rest of the damage to the player's health" 
         
    "sm_adarmor_life_armor_chance"
    "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" 
     
    "sm_adarmor_luck_armor_chance"
    "3""chance between 1 and 10 for Luck armor to activate. The lower the integer, the higher chance of the armor working for players" 
         
    "sm_adarmor_armor_from_engie"
    "1""Enable getting armor from engineer's metal" 
    "sm_adarmor_show_hud_armor"
    "1""Enable HUD" 
         
    "sm_adarmor_allow_self_hurt"
    "1""Let's players destroy their own armor by damaging themselves" 
     
    "sm_adarmor_allow_uber_dmg"
    "0""allows players to destroy ubered or bonked player's armor while invulnerable" 
         
    "sm_adarmor_allow_crit_dmg"
    "0""allows crit damage to ignore armor" 
     
    "sm_adarmor_allow_hud_change"
    "1""Let's players change their HUD parameters with sm_armorhudparams" 
     
    "sm_adarmor_allow_hud_color"
    "1""Let's players change their HUD color with sm_armorhudcolor" 
     
    "sm_adarmor_armoronspawn"
    "1""Enable players to spawn with armor, 1 = full armor, 2 = half, 0 = none" 
     
    "sm_adarmor_armorregen"
    "0""Enables armor regen" 

    "sm_adarmor_allow_voice"
    "1""Enable/Disable Armor Voice, also prevents download of voice files"
     
    "sm_adarmor_armor_from_spencer"
    "1""Enables armor from dispensers" 
     
    "sm_adarmor_level1_repair"
    "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"
     
    "sm_adarmor_level2_repair"
    "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"
     
    "sm_adarmor_level3_repair"
    "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" 
     
    "sm_adarmor_blue"
    "1""Enables armor for BLU team" 
    "sm_adarmor_red"
    "1""Enables armor for RED team" 
     
    "sm_adarmor_version"
    1.9.3"Advanced Armor version" 
     
    "sm_adarmor_scout_maxarmor"
    "50""sets how much max armor scout will have" 
    "sm_adarmor_soldier_maxarmor"
    "200""sets how much max armor soldier will have" 
    "sm_adarmor_pyro_maxarmor"
    "150""sets how much max armor pyro will have" 
    "sm_adarmor_demoman_maxarmor"
    "120""sets how much max armor demoman will have" 
    "sm_adarmor_heavy_maxarmor"
    "300""sets how much max armor heavy will have" 
    "sm_adarmor_engineer_maxarmor"
    "60""sets how much max armor engineer will have" 
    "sm_adarmor_medic_maxarmor"
    "100""sets how much max armor medic will have" 
    "sm_adarmor_sniper_maxarmor"
    "50""sets how much max armor sniper will have" 
    "sm_adarmor_spy_maxarmor"
    "100""sets how much max armor spy will have" 
     
     
     
    "sm_adarmor_scout_armoregen"
    "6""armor regen per second for scout" 
    "sm_adarmor_soldier_armoregen"
    "8""armor regen per second for soldier" 
    "sm_adarmor_pyro_armoregen"
    "8""armor regen per second for pyro" 
    "sm_adarmor_demoman_armoregen"
    "7""armor regen per second for demoman" 
    "sm_adarmor_heavy_armoregen"
    "10""armor regen per second for heavy" 
    "sm_adarmor_engineer_armoregen"
    "6""armor regen per second for engineer" 
    "sm_adarmor_medic_armoregen"
    "7""armor regen per second for medic" 
    "sm_adarmor_sniper_armoregen"
    "6""armor regen per second for sniper" 
    "sm_adarmor_spy_armoregen"
    "7""armor regen per second for spy" 
     
     
     
     
    "sm_adarmor_metaltoarmor"
    "10""converts metal, from engineer, to armor for teammates" 
     
    "sm_adarmor_metaltoarmor_mult"
    "5""multiplies with sm_metaltoarmor to reduce metal cost to repair teammates armor, use in conjuction with sm_metaltoarmor" 
     
    "sm_adarmor_smallammoarmor"
    "0.25""give armor from small ammo packs by multiplying it with the players max armor they can get" 
     
    "sm_adarmor_medammoarmor"
    "0.50""give armor from med ammo packs by multiplying it with the players max armor they can get" 
     
    "sm_adarmor_fullammoarmor"
    "1.0""give armor from full ammo packs by multiplying it with the players max armor they can get" 
     
    "sm_adarmor_dispenser_to_armor"
    "1""gives x amount of armor from dispensers per rate from sm_adarmor_dispenser_time" 
     
    "sm_adarmor_dispenser_time"
    "0.2""amount of rate/time dispensers will give armor" 
     
    "sm_adarmor_setarmor_max"
    "999""highest armor that admins can give armor to players" 
     
     
     
    "sm_adarmor_damage_resistance_light"
    "0.3""how much damage should Light Armor absorb" 
    "sm_adarmor_damage_resistance_med"
    "0.6""how much damage should Medium Armor absorb" 
    "sm_adarmor_damage_resistance_heavy"
    "0.8""how much damage should Heavy Armor absorb" 
    "sm_adarmor_damage_resistance_chance"
    "0.25""how much damage should Luck Armor absorb" 
     
     
     
    "sm_adarmor_armortype_scout"
    "1""ArmorType for Scout; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_soldier"
    "3""Armor Type for Soldier; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_pyro"
    "2""Armor Type for Pyro; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_demo"
    "2""Armor Type for Demoman; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_heavy"
    "3""Armor Type for Heavy; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_engie"
    "2""Armor Type for Engineer; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_med"
    "2""Armor Type for Medic; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_sniper"
    "1""Armor Type for Sniper; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_armortype_spy"
    "2""Armor Type for Spy; Light(1), Medium(2), Heavy(3), Luck(4), Chance(5)" 
     
    "sm_adarmor_advert_bitch"
    "60.0""how many times the advert will bitch at players per second" 
    CHANGELOG
    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, 539 views)
    File Type: sp Get Plugin or Get Source (advanced_armor.sp - 615 views - 60.2 KB)
    File Type: inc advanced_armor.inc (2.2 KB, 607 views)
    File Type: smx advanced_armor.smx (36.6 KB, 635 views)
    __________________

    Last edited by nergal; 05-09-2015 at 11:14. Reason: v1.9.41
    nergal is offline
     



    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 20:52.


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