View Single Post
Author Message
Tylerst
Veteran Member
Join Date: Oct 2010
Old 11-24-2010 , 07:08   [TF2] Full Infinite Ammo
Reply With Quote #1

Old Plugin, new one here:Advanced Infinite Ammo




TF2 Full Infinite Ammo

Description: Give Infinite Ammo/Clip/And more to everyone in game or on a specific target(s)

I made this plugin specifically for TF2 to do more than just infinite ammo/clip like most other infinite ammo plugins.

List of features:
* Infinite Ammo/Clip: Can shoot infinitely
* Infinite Scout Crit-a-cola/Bonk!/Soda Popper Hype
Note: Since the Scout Bonk! lasts forever under infinite ammo I added a Right-click(+attack2) option to manually remove it
* Infinite Soldier Rage: Rage will last for the normal duration, then recharges to 100% when it reaches 0
* Infinite Pyro MMMPH:Same as soldier rage
* Infinite Pyro Manmelter Crits
* Infinite Demoman Shield Charge: Infinite Charge with Shield Equipped\
* Infinite Demoman Ultrapool Caber(Credit to psychonic - MORE BOOM)
* Infinite Engineer Metal/Sentrygun Ammo
* Infinite Uber/Kritz/QuickFix Uses: Uber/Krits/Quickfix will last for the normal duration, then recharges to 100% when it reaches 0
* Infinite Jarate/Sandman Balls/Sandviches/Madmilk/etc
* Infinite Spy Cloak/Dead Ringer/Instant Recharge Spy-cicle
* Infinite Revenge Crits for Frontier Justice/Diamondback
* Infinite Heads/Decapitations: Infinite count for demoman heads(Like the Eyelander) and sniper headshots(Like the Bazaar Bargain)


CVARs(Default Values Shown):
sm_fia_version "2.2.6_Final"
sm_fia_all "0"- Enable/Disable '1/0' Infinite Ammo for everyone
sm_fia_chat "1" - Enable/Disable Showing ammo changes in chat
sm_fia_log "1" - Enable/Disable Logging of ammo changes
sm_fia_batammo "1" - AdminOnly/All/Disable '2/1/0' infinite sandman/wrap assassin balls
sm_fia_adminonly "0" - Enable/Disable '1/0' admin only for infinite ammo - Will allow infinite ammo to admins with b flag(Generic Admin) and may be overidden with sm_fia_adminflag in admin_overrides.cfg
sm_fia_roundwin "0" - Enable/Disable '1/0' Infinite Ammo on round win
sm_fia_waitingforplayers "0" - Enable/Disable '1/0' Infinite Ammo during Waiting For Players

Commands:
sm_fia "target" "1/0": Set Infinite Ammo for target(s) on/off -- Default Slay Flag
sm_fia2 "target" "duration(in seconds)": Give Infinite Ammo to target(s) for a limited time -- Default Slay Flag
sm_full_infinite_ammo "target" "1/0": Set Infinite Ammo for target(s) on/off -- Default Slay Flag
sm_full_infinite_ammo_timed "target" "duration(in seconds)": Give Infinite Ammo to target(s) for a limited time -- Default Slay Flag

Examples for sm_fia and sm_full_infinite_ammo:
sm_fia Thetarget 1
sm_fia @me 1
sm_fia @bots 1
sm_full_infinite_ammo @humans 1
sm_full_infinite_ammo @blue 1
sm_full_infinite_ammo @blue 0
..etc

Examples for sm_fia2 and sm_full_infinite_ammo_timed:
sm_fia2 Thetarget 10
sm_fia2 @me 5
sm_fia2 @bots 30
sm_full_infinite_ammo_timed @humans 300
sm_full_infinite_ammo_timed @blue 13.37
sm_full_infinite_ammo_timed @all 3.14
..etc


Changelog
Code:
Version 2.0.0 - June 30, 2011
* Initial Release of 2.0.0(complete re-write of 1.x.x version)
* Added infinite sentry ammo for engineers with infinite ammo
* Made use of AskPluginLoad2 to check the game instead of using my own function
* Moved most of the offset initilizations to OnPluginStart instead of inside OnGameFrame
* Made avid use of switch statements where possible
* Used classname to check for mediguns and the sandman instead of the weapon index
* Changed global IA switch to a bool
* The sm_fia_all cvar now uses the global variable instead of it's own variable, this will allow turning IA off on someone even when sm_fia_all is set to 1
* Lots of small optimizations for where things are initialized/used  
 
Version 2.0.2 - July 29, 2011
*Added admin only cvar
*Sandman cvar can now be set to 2 for admin only 
 
Version 2.0.3 - July 29, 2011
*Adjusted Adminonly cvar to use checkcommandaccess on sm_fia
*sm_fia_all will now show infinite ammo for admins enabled message instead of everyone when sm_fia_adminonly is enabled(unchanged for turning sm_fia_all off)
*sm_fia_all change messages will now obey sm_fia_chat cvar setting 
 
Version 2.0.5 - August 4, 2011
*Added Infinite ammo for Cow Mangler and Bison 
 
Version 2.0.7 - August 7, 2011
*Added back roundwin cvar from the 1.0.0 release 
 
Version 2.0.8 - August 18, 2011
*Changed serveral bits of coding to use SetEntProp vs SetEntData 
 
Version 2.0.9 - August 21, 2011
*Changed adminonly checks to be configurable with overrides
*Added infinite revenge crits for Engineer's Frontier Justice and Spy's Diamondback 
 
Version 2.1.0 - September 2, 2011
*Changed returns to continues in for loop
*Removed player array on roundwin bool
 
Version 2.1.1 - November 3, 2011
* Fixed bug with Widowmaker, was setting metal to 99
* Minor code changes
 
Version 2.1.2 - December 17, 2011
*Pomson 6000 now has infinite ammo
*Phlogistinator MMMPH now recharges when depleted(like soldier rage)
*Spy-cicle now regenerates instantly
*Moved class specific weaponindex checks to the switch

Version 2.1.3 - December 17, 2011
*Small update, forgot to give manmelter infinite crit shots

Version 2.1.4 - December 19, 2011
*Small update to fix a bug with the spy-cicle

Version 2.2.0 - December 24, 2011
*sm_fia_sandman changed to sm_fia_batammo, will now affect both the sandman and wrap assassin
*Added fia2 command for timed infinite ammo

Version 2.2.1 - January 9, 2012
*Fixed a bug with using the sm_fia command on a target not fully loaded into the game or not alive

Version 2.2.2 - January 22, 2012
*Added Valid Entity check for spy knife to prevent errors where the knife isn't valid such as wepaon removal

Version 2.2.3 - March 18, 2012
*Added Infinite Heads for demoman/sniper

Version 2.2.4 - March 20, 2012
*Added cvar for infinite ammo during Waiting For Players 
*Added 2 alternate, more descriptive commands

Version 2.2.5 - June 29, 2012
*Added Infinite Focus for Hitman's Heatmaker and Infinite Boost for Baby Face's Blaster
*Few small code changes

Version 2.2.6_Final - July 19, 2012
*Fixed all Sniper Rifles receiving focus effects of the Hitman's Heatmaker


Changelog(Old):
Code:
Version 1.0.0 - November 24, 2010 
* Initial release.
 
Version 1.1.0 - November 25, 2010 
* Added Admin Command by request along with chat/log cvars
* Changed sm_fia_enable to sm_fia_all 
 
Version 1.1.1 - November 26, 2010 
* Added code to remove infinite ammo on disconnect as a preventative bug measure
 
Version 1.1.2 - November 27, 2010 
* Changed Soldier Rage to the same setup as Medic Uber, 
after adding the command it made the orginal rage method useless.
* Added Code to set infinite ammo off on player connections
 
Version 1.1.3 - November 27, 2010 
* Small coding change(bug fix)
 
Version 1.1.4 - December 03, 2010 
* Another small coding change
 
Version 1.1.5 - December 12, 2010 
* Added valid entity check on active weapon(for civilian exploit, but probably also needed for remove weapon plugins)
 
Version 1.2.0 - February 5, 2011 
* Added cvar sm_fia_sandman to disable infinite sandman balls(by request) 
* Changed some coding to improve performance a bit
 
Version 1.2.1 - February 15, 2011
* Moved sandman check out of scout only area, and changed to a weapon check instead of an index check
 
Version 1.2.2 - February 16, 2011
* Update to fix bonk/crit-a-cola with sandman cvar
 
Version 1.3.0 - February 27, 2011
* Added Infinite Ultrapool Caber(credit to psychonic)
* Changed infinite charge code and added cvar
 
Version 1.3.3 - June 27, 2011
* Added Quick fix to list of mediguns
* Added Infinite Hype
* Changed condition checks to use the new TF2_IsPlayerInCondition stock
* Changed infinite charge to use the new m_flChargeMeter property
* Removed the infitarge cvar as a result of the previous point
 
Version 1.3.4
* Fixed small typos in the cvars, nothing that would affect the working of the plugin if you're using 1.3.3
Things I won't be adding:
Infiniite Buildings for Engineers: far too laggy, and you can do this yourself with other plugins
Infinite Deployed Stickys for Demoman: also laggy
(Both of these would likely require an extension as well).
Attached Files
File Type: sp Get Plugin or Get Source (TF2 Full Infinite Ammo.sp - 14333 views - 13.6 KB)

Last edited by Tylerst; 07-20-2012 at 01:52. Reason: Update
Tylerst is offline