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

[TF2] Advanced Infinite Ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Tylerst
Veteran Member
Join Date: Oct 2010
Plugin ID:
3105
Plugin Version:
1.5.3
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    67 
    Plugin Description:
    Infinite usage for just about everything
    Old 07-20-2012 , 01:45   [TF2] Advanced Infinite Ammo
    Reply With Quote #1

    Advanced Infinite Ammo

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

    List of features:
    * Infinite Ammo/Clip
    * Infinite Crit-a-cola/Bonk! Note: Right-click(alt-fire) to manually remove bonk!
    * Infinite Hype
    * Infinite usage for Rage based weapons(Banners, Phlog, etc)
    * Beggar's Bazooka - Hold right-click(alt-fire) to fire infinite rockets
    * Infinite Manmelter/Frontier Justice/Diamondback Crits (Shoot once to activate)
    * Infinite Shield Charge
    * Infinite Ullapool Caber
    * Infinite Metal/Sentrygun Ammo
    * Infinite usage for Uber/Kritz/QuickFix
    * Infinite Jarate/Sandman Balls/Sandviches/Madmilk/etc
    * Infinite Cloak/Dead Ringer/Instant Recharge Spy-cicle
    * Infinite Heads/Decapitations
    * Infinite Spell Uses(Press reload to remove current spell)


    CVARs(Default Values Shown: 1 = Enabled, 0 = Disabled):
    Note: The plugin automatically creates AdvancedInfiniteAmmo.cfg at tf/cfg/sourcemod
    Change the default values there.

    sm_aia_version "1.5.3"

    sm_aia_all "0" - Advanced Infinite Ammo for everyone(and will automatically give it to anyone who connects)
    sm_aia_adminonly "0" - Advanced Infinite Ammo will work for admins only, 1 = Completely admin only, 2 = Admin only but the commands will work on non-admins
    -Default "b" flag - Can be overridden with sm_aia_adminflag
    sm_aia_bots "1" - Advanced Infinite Ammo will work for bots
    sm_aia_roundwin "1" - Advanced Infinite Ammo for everyone on round win
    sm_aia_waitingforplayers "1" - Advanced Infinite Ammo for everyone during waiting for players phase
    sm_aia_chat "1" - Show Advanced Infinite Ammo changes in chat
    sm_aia_log "1" - Log Advanced Infinite Ammo commands
    sm_aia_disabledweapons "" - Weapons indexes to not give infinite ammo, separated by semicolons(Do not add spaces) --eg. sm_aia_disabledweapons "44;58;222" would disable sandman, jarate and mad milk

    sm_aia_clip "1" - Infinite Clip will be globally disabled
    sm_aia_ammo "1" - Infinite Ammo will be globally disabled
    sm_aia_extrastuff "1" - Infinite Extra Stuff will be globally disabled
    sm_aia_metal "1" - Infinite Metal will be globally disabled
    sm_aia_sentryammo "1" - Infinite Sentry Ammo will be globally disabled
    sm_aia_cloak "1" - Infinite Cloak will be globally disabled
    sm_aia_spells "1" - Infinite Spells will be globally disabled

    Commands:
    sm_aia "target" "1/0" - Give Advanced Infinite Ammo to the target(s) (Can auto-target self with just sm_fia)
    sm_aia2 "target" "time(in seconds)" - Give Advanced Infinite Ammo to the target(s) for a limited time
    sm_advanced_infinite_ammo "target" "1/0" - Same as sm_aia
    sm_advanced_infinite_ammo_timed "target" "time(in seconds)" - Same as sm_aia2
    sm_aiamenu - Open menu to choose target's AIA capabilities(flags globally disabled by the cvars cannot be changed)
    Note: Can override sm_aia_targetflag to control which admins can target others

    Command Usage Examples:
    sm_aia -Toggle AIA on yourself
    sm_aia Bob 1 -Enable AIA on Bob
    sm_aia @all 1 -Enable AIA on everyone
    sm_aia @red 1 -Enable AIA on red team
    sm_aia @!me 0 -Disable AIA for everyone except yourself
    (sm_advanced_infinite_ammo can be used in place of sm_aia)

    sm_aia2 @me 10 - Give yourself AIA for 10 seconds
    sm_aia2 Bob 30 - Give Bob AIA for 30 seconds
    sm_aia2 @all 300 - Give everyone AIA for 5 minutes
    (sm_advanced_infinite_ammo_timed can be used in place of sm_aia2)

    Changelog
    Code:
    Version 1.0.0 - July 20, 2012
    * Initial Release
    
    Version 1.0.1 - July 20, 2012
    * Added sm_aia_targetflag override to set which admins can target others
    * Fixed a typo in the self target part
    
    Version 1.0.2 - July 27, 2012
    * Beggar's Bazooka now has a hold right-click(alt-fire) option for firing infinite rockets
    * Reverted Bonk!/Crit-A-Cola to old plugin behavior(Infinite duration+right click[alt-fire] to remove Bonk!)
    * Moved the Sandman/Wrap Assassin to their own case to make it a bit simpler to enable the admin check, or disable them altogether
    * August 1, 2012 Fixed sm_aia_adminonly being 1 by default, No version change
    
    Version 1.1.0 - August 4, 2012
    * Plugin now uses SDKHooks
    * Added weapon indexes from The Triad Pack
    * Fixed plugin not detecting arena round start
    
    Version 1.1.1 - August 7, 2012
    * Added sm_aia_bots cvar to control whether bots can receive Advanced Infinite Ammo
    * Changed validation code a bit to fix errors
    
    Version 1.1.2 - August 16, 2012
    * Fixed plugin not detecting mvm wave start
    
    Version 1.2.0 - December 13, 2012
    *Code cleanup in a few areas(Such as caching cvars instead of using GetConVar* in a for loop)
    *Updated item indexes
    *Can now set sm_aia_ammoonly to set ammo instead of clip(Must still reload weapon)
    *Can now set sm_aia_extrastuff to allow/disallow extra things such as ubercharge/rage/hype/etc off to only have ammo related things
    *Can now set sm_aia_adminonly to 2 to allow the admin command to work on non-admins
    
    Version 1.2.1 - December 13, 2012
    *Small update, I forgot to add silver/gold botkiller weapons in 1.2.0(Thanks to raygius for messaging me)
    
    Version 1.2.2 - December 21, 2012
    *Updated for new item indexes
    
    Version 1.2.3 - January 6, 2013
    *Sappers now infinite in MvM
    
    Version 1.2.4 - January 7, 2013
    *Added infinite sniper rifle charge meter(with extrastuff enabled)
    
    Version 1.2.5 - January 9, 2013
    *Added better late load support
    
    Version 1.2.6 - January 21, 2013
    *Added infinite rage for Heavy Miniguns in MvM(with extrastuff enabled)
    *Added Festive Minigun index(No idea why, but I found out it was missing when adding the above code)
    
    Version 1.2.7 - January 24, 2013
    *Added Infinite Razorback(Thanks to FlaminSarge for the method idea)
    
    Version 1.2.8 - March 01, 2013
    *Fixed Festive Ambassador and Festive Grenade launcher being in ammo section instead of clip section(Thanks to rayguis for pointing it out)
    
    Version 1.2.9 - May 27, 2013
    *Added Ap-Sap and Ham Shank indexes
    *Moved Flamethrowers into the Only Ammo category(They no longer need clip set for airblast ammo)
    
    Version 1.3.0 - October 13, 2013
    *Fixed waitingforplayers cvar not removing infinite ammo if it was changed during waitingforplayers
    *Changed Crusader's Crossbow to ammo mode until Valve decides to fix it's rapid fire with a clip size higher than 1
    *Changed Event hooks to EventHookMode_PostNoCopy since the plugin doesn't need to retrieve any values from them
    *Non-plugin related, removed SDKhooks link and compiled plugin since sdkhooks now comes with sourcemod as of 1.5 and will compile on the forum
    
    Version 1.3.1 - November 3, 2013
    *Added Infinite Spell Uses(Press reload to remove current spell)
    *Added Automatic config creation(AdvancedInfiniteAmmo.cfg in tf/cfg/sourcemod/)
    
    Version 1.3.3 - November 5, 2013
    *Fixed an error that would occur if no players had a spellbook equipped
    
    Version 1.3.4 - December 3, 2013
    *Fixed AutoExecConfig creating AdvancedInfiniteAmmo.cfg.cfg
    *Added Infinite Medic Shield(MvM) with extra stuff cvar enabled
    *Changed SetAmmo from 999 to 500 to fix a console spam error related to the heal target ammo counter
    
    Version 1.3.5 - December 14, 2013
    *Added cvar sm_aia_disabledweapons to control which weapon indexes should not get infinite ammo
    *Added Golden Frying Pan index to melee case
    
    Version 1.3.6 - December 19, 2013
    *Fixed disabled weapons cvar not working for spellbooks
    
    Version 1.3.7 - June 19, 2014
    *Added newer Item Indexes
    
    Version 1.3.8 - June 28, 2014
    *Slight code change to check for Valid Weapon
    
    Version 1.3.9 - June 29, 2014
    *Updated game check code
    *Fixed Hitman's Heatmaker and Bazaar Bargain not getting full charge damage
    
    Version 1.4.0 - July 17, 2015
    *Revamp of plugin to 1.7 syntax
    *Sorted wepaon index section by class and slot and updated indexes
    *Changed Sentry Infinite Ammo to use the games built in Infinite ammo flag rather than forcing it in OnPreThink(should improved performance)
    
    Version 1.4.1 - July 17, 2015
    *Changed OnClientPutInServer to OnClientPostAdminCheck
    
    Version 1.4.2 - July 17, 2015
    *Added item indexes 15000-15059(Thanks to xXDeathreusXx and abrandnewday for notifying me)
    
    Version 1.4.3 - July 19, 2015
    *Changed Sentry ammo code to use OnEntityCreated Instead of the build event 
    *Sentry code now adds/removes the ammo flag with the current flags taken into account instead of overwriting them.
    
    Version 1.4.4 - July 19, 2015
    *Fixed a few bugs with new sentry code
    
    Version 1.4.5 - July 28, 2015
    *Fixed sniper bow indexes(separated them from rifles)
    
    Version 1.4.6 - July 29, 2015
    *Fixed LochNLoad/AliBaba'sWeeBooties indexes being switched.
    
    Version 1.5.0 - August 2, 2015
    *New command sm_aiamenu to control target's AIA capabilities and Cvars to allow global disabling
    *Removed curent sm_aia_extrastuff and sm_aia_ammonly due to above change
    *Added new natives for use in other plugins(see include file)
    
    Version 1.5.1 - September 14, 2015
    * Small bit of code change to fix errors in 1.8 compiler(No functional difference from 1.5.0)
    
    Version 1.5.2 - October 3, 2015
    *Fixed global ammoflags not properly being enabled/disabled properly if plugin/config file matched.
    
    Version 1.5.3 - October 7, 2015
    *Added the 4 Invasion weapon indexes
    Attached Files
    File Type: inc advancedinfiniteammo.inc (2.0 KB, 5524 views)
    File Type: sp Get Plugin or Get Source (AdvancedInfiniteAmmo.sp - 13294 views - 41.1 KB)

    Last edited by Tylerst; 10-07-2015 at 10:05.
    Tylerst is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 07-20-2012 , 02:08   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #2

    ~Reserved just in case
    Tylerst is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 07-31-2012 , 18:51   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #3

    Quote:
    Originally Posted by Tylerst View Post
    ~Reserved just in case
    Hello Tyler,

    I have the plugin running on the server and am currently testing it alongside people who have the flags enabled to use !aia. However, my infinite ammo works while his doesn't, but he was able to execute !aia properly and see "Inf. ammo enabled for <name>."

    There was nothing in the error log and I deleted the old version and replaced it with this version. What could be the issue here?

    I suspect it to be a simple flag setting error:

    Code:
    Groups
    {
    	"Default"
    	{
    		 Overrides
    		 {
                   "sm_togglehoming"   "allow"
                   "sm_gimme"          "allow"
    		 }
    
    		 "immunity"		"10"
    	}
    	
    	"Donor"
    	{
    		 Overrides
    		 {
                   "sm_aia"            "allow"
                   "sm_rainbowize"     "allow"
                   "sm_gimme"          "allow"
    			   "sm_behhh"          "allow"
    		 }
    
    		"flags"		    "a"
    		"immunity"		"90"
    	}
    
    	"Admin"
    	{
    		 Overrides
    		 {
    		 }
    
    		"flags"		    "abcdefghijklmnz"
    		"immunity"		"100"
    	}
    }

    Last edited by Mr. Man; 07-31-2012 at 18:59.
    Mr. Man is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 08-01-2012 , 02:08   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #4

    Whoops, I see what happened.
    With 1.0.2 I accidently set sm_aia_adminonly to 1 by default.

    Let me go re-upload 1.0.2.

    Update - No version change
    -Fixed sm_aia_adminonly being 1 by default instead of 0


    There, just re-download it, it should work for you now.
    However, if you still want sm_aia_adminonly set to 1, just add "sm_aia_adminflag" "allow" to their overrides.

    Last edited by Tylerst; 08-01-2012 at 02:17.
    Tylerst is offline
    TurretTheEpic
    Senior Member
    Join Date: Jul 2012
    Old 07-20-2012 , 02:14   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #5

    Im gonna try it
    TurretTheEpic is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 07-20-2012 , 03:15   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #6

    Don't know the differences between the old one, maybe a list would suffice.
    ReFlexPoison is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 07-20-2012 , 03:31   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #7

    Quote:
    Originally Posted by ReFlexPoison View Post
    Don't know the differences between the old one, maybe a list would suffice.
    Most of the changes are in how it's coded. For the end user, it's practically the same. Off the top of my head the only large gameplay difference I can think of is that Bonk!/CritACola are infinite usage now rather than infinite duration.(Though I left the code in for the old way if it's really important to anyone, so they can re-enable it.)

    Edit: As of 1.0.2 Bonk/Crit-A-Cola are Infinite Duration with right-click(alt-fire) to remove Bonk!, again.

    The largest difference is in how it applies everything. It goes by weapon now rather than class, so it will work more fluidly with things like FlaminSarge's GiveWeapon and Randomizer. As a result, you can also add weapon exceptions fairly easily if you want to by moving cases to the do nothing area.

    Last edited by Tylerst; 07-27-2012 at 15:51.
    Tylerst is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 07-20-2012 , 03:38   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #8

    Quote:
    Originally Posted by Tylerst View Post
    Most of the changes are in how it's coded. For the end user, it's practically the same. Off the top of my head the only large gameplay difference I can think of is that Bonk!/CritACola are infinite usage now rather than infinite duration.(Though I left the code in for the old way if it's really important to anyone, so they can re-enable it.)

    The largest difference is in how it applies everything. It goes by weapon now rather than class, so it will work more fluidly with things like FlaminSarge's GiveWeapon and Randomizer. As a result, you can also add weapon exceptions fairly easily if you want to by moving cases to the do nothing area.
    Ah sweet, ty for the info. Will try it out soon.
    ReFlexPoison is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 07-20-2012 , 04:05   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #9

    please add noreload cvar/command
    so people would have an unlimited ammo, but not infinite fire.
    __________________
    Leonardo is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 07-20-2012 , 05:00   Re: [TF2] Advanced Infinite Ammo
    Reply With Quote #10

    Quote:
    Originally Posted by Leonardo View Post
    please add noreload cvar/command
    so people would have an unlimited ammo, but not infinite fire.
    Not something I'm interested in doing with the main plugin, but if you really want that, you can just change the SetClip entries to SetAmmo (Remove them where they already have SetAmmo) and re-compile.
    Added in 1.2.0

    Last edited by Tylerst; 01-22-2013 at 00:41.
    Tylerst 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 12:36.


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