AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Weapon Pickup Responses (2017-12-29) (https://forums.alliedmods.net/showthread.php?t=285281)

nosoop 07-16-2016 03:33

[TF2] Weapon Pickup Responses (2017-12-29)
 
3 Attachment(s)
Idea stolen from this post.

Description:
Players speak their MvM loot responses when picking up rare weapons.

Specifically:
  • Rare loot response:
    • Assassin-grade weapons.
    • The C.A.P.P.E.R and Giger Counter also fall into this category.
  • Ultra rare loot response:
    • Unusual, Elite-grade, or Australium weapons.
    • Batsaber, Golden Wrench, and the Saxxy also fall into this category.
The weapon rarity depends on a hard-coded list of item defindices.

The plugin does not have any externally configurable options (i.e., no config files or ConVars).

Things this plugin will clobber:
The plugin detects weapon pickups by checking that the weapon in a WeaponEquipPost event hook is equipped by a different person than the owner.
As a result, if you're equipping items that fit one of the criteria mentioned onto players and not setting the account ID before that hook is fired, then the voice response will play.

Dependencies:
Just SDKHooks is absolutely required. Australium detection is handled by checking for the "is australium item" attribute via TF2Attributes.

Changelog:
  • 0.1.8 (2017-12-29) (Information on GitHub.)
  • 0.1.4 (2016-09-09)
    • TF2Attributes is now not required at compile time. If not present, Australium detection will be disabled, and a message is displayed indicating the configuration.
    • (0.1.3) Made -1 terminate the rarity lookup list instead of 0. If you want to use the stock bat, now you can! You'll still have to edit the plugin, though.
  • 0.1.0 (2016-07-16)
    • Rewrote the lookup table handling. Instead of checking the weapon's grading, we just check for its perceived rarity instead. The table is also zero-terminated now, instead of specifying how long it should be in another array.
    • Also added support for the Saxxy and Golden Wrench.
  • 0.0.2 (2016-07-16)
    • Changed weapon pickup detection method. Does not require SourceMod 1.8+ for OnClientCommandKeyValues_Post anymore.
    • This also means picking up a weapon they own (e.g., from killing a player that picked up their weapon) will not trigger the response line.
  • 0.0.1 (2016-07-16)
    • Initial release.
Source code / Releases


All times are GMT -4. The time now is 05:29.

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