AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Advanced Infinite Ammo (https://forums.alliedmods.net/showthread.php?t=190562)

Tylerst 07-20-2012 01:45

[TF2] Advanced Infinite Ammo
 
4 Attachment(s)
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


Tylerst 07-20-2012 02:08

Re: [TF2] Advanced Infinite Ammo
 
~Reserved just in case

TurretTheEpic 07-20-2012 02:14

Re: [TF2] Advanced Infinite Ammo
 
Im gonna try it :D

ReFlexPoison 07-20-2012 03:15

Re: [TF2] Advanced Infinite Ammo
 
Don't know the differences between the old one, maybe a list would suffice.

Tylerst 07-20-2012 03:31

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by ReFlexPoison (Post 1754239)
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.

ReFlexPoison 07-20-2012 03:38

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Tylerst (Post 1754244)
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.

Leonardo 07-20-2012 04:05

Re: [TF2] Advanced Infinite Ammo
 
please add noreload cvar/command
so people would have an unlimited ammo, but not infinite fire.

Tylerst 07-20-2012 05:00

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Leonardo (Post 1754260)
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

Horsedick 07-20-2012 10:16

Re: [TF2] Advanced Infinite Ammo
 
How do I restrict infinite sandman and wrap assassin balls to Admins only but able to set everything else for everyone else?

Tylerst 07-20-2012 11:45

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Horsedick (Post 1754424)
How do I restrict infinite sandman and wrap assassin balls to Admins only but able to set everything else for everyone else?

If you're worried about lag, I released a plugin to fix that a couple days ago: Ball Projectile Limit

Edit: As of 1.0.2, it's much simpler to do this, just uncomment the if statement, or comment the SetAmmo to disable them altogether.
Code:

//Sandman, Wrap Assassin - Ammo
case 44, 648:
{
        //Admin Check(Old Plugin Behavior)
        //if(!CheckCommandAccess(client, "sm_fia_adminflag", ADMFLAG_GENERIC)) return;
        SetAmmo(client, iWeapon);
}

Old

Horsedick 07-20-2012 12:11

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Tylerst (Post 1754463)
If you're worried about lag, I released a plugin to fix that a couple days ago: Ball Projectile Limit

Otherwise, I left the code in for the admin check:
Code:

//Sandman, Wrap Assassin - Admin Check(Old Plugin Behavior)
case 44, 648:
{
    if(!CheckCommandAccess(client, "sm_fia_adminflag", ADMFLAG_SLAY)) return;
    SetAmmo(client, iWeapon);
}

Just remove the cases from the Type2 Weapons area and uncomment this(remove the /* */ )

Ok going to make the edits I did to your code as seen above.... that way only those with SLAY permissions can access unlimited ammo for both sandman and wrap assassin but not someone else I give it to or that can enable it such as thru flag "o" or CUSTOM1 .. correct?

Tylerst 07-20-2012 15:17

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Horsedick (Post 1754485)
Ok going to make the edits I did to your code as seen above.... that way only those with SLAY permissions can access unlimited ammo for both sandman and wrap assassin but not someone else I give it to or that can enable it such as thru flag "o" or CUSTOM1 .. correct?

Specifically, it will first check for an sm_aia_adminflag override, but if you don't have one set, then yes, it will use the slay flag, and only people with the slay flag will have infinite balls.

mal415 07-20-2012 17:03

Re: [TF2] Advanced Infinite Ammo
 
I use this plugin as a donator perk (using a custom admin flag). Can this plugin allow players to toggle it on themselves but not allow them to give it to others?

If you have access to sm_aia you have access to both or is there a way to split them?

Tylerst 07-20-2012 21:05

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by mal415 (Post 1754689)
I use this plugin as a donator perk (using a custom admin flag). Can this plugin allow players to toggle it on themselves but not allow them to give it to others?

If you have access to sm_aia you have access to both or is there a way to split them?

There is now. :)
Just override sm_aia_targetflag and they will only be able to use sm_aia and sm_aia @me 1/sm_aia @me 0


Update to 1.0.1
-Added sm_aia_targetflag ovverride to control which admins can target others
-Fixed a typo in the self-targetting

Diviara27 07-20-2012 23:31

Re: [TF2] Advanced Infinite Ammo
 
Just a suggestion:

Can you add a infinite rockets loaded in the Beggar's Bazooka?

Tylerst 07-20-2012 23:35

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Diviara27 (Post 1754859)
Just a suggestion:

Can you add a infinite rockets loaded in the Beggar's Bazooka?

I tried it like that during testing.

With infinite clip, it never stops firing, and you can't change weapons.

I decided to change it to just infinite ammo as a solution, but if you really want to the other way.
Move case 730 from Type 2 weapons to Type 1 weapons and recompile.

Edit: Unless you just mean being able to load more than 3 shots at once, in which case that's not doable with this plugin. TF2Items' config can let you do that though.

Edit 2: As of 1.0.2, the Beggar's Bazooka has a hold right-click(alt-fire) option for infinite rockets.

Minoost 07-21-2012 08:21

Re: [TF2] Advanced Infinite Ammo
 
Nice work!

siren 07-21-2012 20:46

Re: [TF2] Advanced Infinite Ammo
 
seems to work nice for me but not for anyone else

Diviara27 07-22-2012 02:29

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Tylerst (Post 1754860)
I tried it like that during testing.

With infinite clip, it never stops firing, and you can't change weapons.

I decided to change it to just infinite ammo as a solution, but if you really want to the other way.
Move case 730 from Type 2 weapons to Type 1 weapons and recompile.

Edit: Unless you just mean being able to load more than 3 shots at once, in which case that's not doable with this plugin. TF2Items' config can let you do that though.

What is this plugin's version that uses the infinite clip but never stops firing and change weapons?

Tylerst 07-22-2012 05:10

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Diviara27 (Post 1755552)
What is this plugin's version that uses the infinite clip but never stops firing and change weapons?

This code would give it infinite clip, just compile and use.

Edit: Removed Code. As of 1.0.2, the Beggar's Bazooka has a hold right-click(alt-fire) option for infinite rockets.

Horsedick 07-22-2012 15:12

Re: [TF2] Advanced Infinite Ammo
 
Tylerst, I just finished up the revision I posted above to the new version and tried to compile and getting this error - been out of town a few days or else I would have posted this the other day.

Quote:

/home/groups/sourcemod/upload_tmp/phpw6fPMp.sp(332) : error 040: duplicate "case" label (value 44)

Tylerst 07-22-2012 18:00

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Horsedick (Post 1755936)
Tylerst, I just finished up the revision I posted above to the new version and tried to compile and getting this error - been out of town a few days or else I would have posted this the other day.

Looks like you forgot to remove case 44 and 163 from the Type2 Weapons section above before you uncommented that.
Look for case 44 and 163 in the Type2 Weapons section and remove them from there first.

NameUser 07-24-2012 08:59

Re: [TF2] Advanced Infinite Ammo
 
Is it possible for perma-infinite ammo?

Diviara27 07-24-2012 10:32

Re: [TF2] Advanced Infinite Ammo
 
Is there a cvar that whenever a player instantly connects, he receives infinite ammo already?

Tylerst 07-24-2012 15:37

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by NameUser (Post 1757118)
Is it possible for perma-infinite ammo?

Not sure what you mean. Unless you're using the timed command, it's already permanent.

Other than that, setting the sm_aia_all cvar to 1 will give it to everyone automatically.(And setting sm_aia_adminonly to 1 after that will give it to all admins automatically)

Quote:

Originally Posted by Diviara27 (Post 1757177)
Is there a cvar that whenever a player instantly connects, he receives infinite ammo already?

sm_aia_all "0" - Advanced Infinite Ammo for everyone

Just change it to 1

Tylerst 07-27-2012 07:10

Re: [TF2] Advanced Infinite Ammo
 
Updated to 1.0.2
-Beggar's Bazooka now has an infinite firing option by holding right-click(alt-fire)
-Reverted Bonk!/Crit-A-Cola to work the the old plugin(Infinite duration, and can right-click(alt-fire) to remove Bonk!)
Edit: -Moved Sandman/Wrap Assassin to a separate case area to allow for easier customization of them.

Horsedick 07-27-2012 09:44

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Tylerst (Post 1759175)
Updated to 1.0.2
-Beggar's Bazooka now has an infinite firing option by holding right-click(alt-fire)
-Reverted Bonk!/Crit-A-Cola to work the the old plugin(Infinite duration, and can right-click(alt-fire) to remove Bonk!)

ok looks like you also adjusted the sandman/wrap assassin to go with changes I needed and was making....you didn't note that in here but great just need to check/change a few things over with it and should be the same.

assuming a single // ahead of the CheckCommandAccess is all that is needed and a change of flag for me should be enough to restrict the use of these for unlimited ammo.

Tylerst 07-27-2012 15:46

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Horsedick (Post 1759259)
ok looks like you also adjusted the sandman/wrap assassin to go with changes I needed and was making....you didn't note that in here but great just need to check/change a few things over with it and should be the same.

assuming a single // ahead of the CheckCommandAccess is all that is needed and a change of flag for me should be enough to restrict the use of these for unlimited ammo.

Yeah, you just need to uncomment that. I changed it just because it made it a bit easier for people, and it didn't make the plugin work any differently(that's also why it isn't in the notes). Though I suppose I'll go add it, and change my post about doing that.

machede 07-29-2012 07:37

Re: [TF2] Advanced Infinite Ammo
 
where to insert
Custom Menu Example.txt (file txt)

Tylerst 07-29-2012 14:24

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by machede (Post 1760503)
where to insert
Custom Menu Example.txt (file txt)

http://wiki.alliedmods.net/Custom_Ad...nu_(SourceMod)

Mr. Man 07-31-2012 18:51

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Tylerst (Post 1754226)
~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"
        }
}


Tylerst 08-01-2012 02:08

Re: [TF2] Advanced Infinite Ammo
 
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.

FlaminSarge 08-04-2012 03:39

Re: [TF2] Advanced Infinite Ammo
 
AIA seems to think that the first round of arena is waiting for players. Might wanna hook the arena round active events and stuff as a safety check. It looks like it doesn't turn off after the next round starts, either.

Tylerst 08-04-2012 03:56

Re: [TF2] Advanced Infinite Ammo
 
Pfft, who the hell plays arena? :wink: Just kidding. Thanks for telling me as I actually never play or test for arena.

I'll fix it in the next patch, along with adding the new weapon indexes in, since they don't seem to have any new features(That would require special coding, that is).

FlaminSarge 08-04-2012 04:44

Re: [TF2] Advanced Infinite Ammo
 
Also, you might want to check against the entity's classname too, as I can definitely have a tf_weapon_raygun with index 18 (or a tf_weapon_rocketlauncher with index 442). Netprops are by the entity's classname too, so it's better to check the classname first, then use the index for any special rules you apply (e.g. the Bazooka).

Tylerst 08-04-2012 06:21

Re: [TF2] Advanced Infinite Ammo
 
Updated to 1.1.0
- Plugin uses SDKHooks now
- Added Triad weapon indexes
- Fixed detection of arena round start



Quote:

Originally Posted by FlaminSarge (Post 1764285)
Also, you might want to check against the entity's classname too, as I can definitely have a tf_weapon_raygun with index 18 (or a tf_weapon_rocketlauncher with index 442). Netprops are by the entity's classname too, so it's better to check the classname first, then use the index for any special rules you apply (e.g. the Bazooka).

Hmm, I've never personally had that happen. Perhaps it's something specific to custom items created with TF2Items.

I'll keep it in mind the next time I do a full re-write of the plugin, though.

FlaminSarge 08-05-2012 06:37

Re: [TF2] Advanced Infinite Ammo
 
It is indeed specific to custom items (though not necessarily TF2Items, as any plugin can modify m_iItemDefinitionIndex on a weapon entity).

Shona 08-06-2012 04:07

Re: [TF2] Advanced Infinite Ammo
 
hm new mod but again no settings to disable Class Specific actions as ia ask here https://forums.alliedmods.net/showpo...&postcount=242

so i have to make it again for myself and command it out -.-"

Tylerst 08-06-2012 08:53

Re: [TF2] Advanced Infinite Ammo
 
Quote:

Originally Posted by Shona (Post 1765611)
hm new mod but again no settings to disable Class Specific actions as ia ask here https://forums.alliedmods.net/showpo...&postcount=242

so i have to make it again for myself and command it out -.-"

That's because it isn't class based anymore, it's weapon based.

However if you want to disable infinite Uber/Sentry ammo like before it's much easier now, just comment out/delete these:

PHP Code:

SetSentryAmmo(client); 

PHP Code:

SetUberCharge(iWeapon); 


Shona 08-07-2012 09:10

Re: [TF2] Advanced Infinite Ammo
 
1 Attachment(s)
No i have to disable all class specific actions (see below) so again taking the source and make crap in it and that always on every new version... :( :cry:

I need this because the plugin runs on an achievement and trade server and our users are pissed because stupid users annoying our users and make only shit with this special actions.
Thats why i ask if you can make them with an command and so all admins can disable them easier if they need it.

class specific actions

Code:

SetSentryAmmo(client);
SetCloak(client);
SetHypeMeter(client);

//Medigun(Normal, Upgradeable, & Festive), Kritzkrieg, Quick-Fix - Ubercharge Meter
        case 29,35,211,411,663:
        {
            SetUberCharge(iWeapon);
        }
       
       
        //Sandman, Wrap Assassin - Ammo
        case 44, 648:
        {
            //Admin Check(Old Plugin Behavior)
            //if(!CheckCommandAccess(client, "sm_fia_adminflag", ADMFLAG_GENERIC)) return;
            SetAmmo(client, iWeapon);
        }

        //Bonk!, CritACola - Ammo
        case 46,163:
        {
            SetAmmo(client, iWeapon);
            SetDrinkMeter(client);
            if(GetClientButtons(client) & IN_ATTACK2) TF2_RemoveCondition(client, TFCond_Bonked);
        }

        //Buff Banner, Battalion's Backup, Concheror
        case 129,226,354:
        {
            SetRageMeter(client);
        }

i hope Infinite Jarate/Madmilk/etc are in one of this codes because i can't found it - Edit: Ok they are not in


Edit 2:
Many Error as you see in the attachment... :(


All times are GMT -4. The time now is 16:08.

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