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

[TF2] Weapon Pickup Responses (2017-12-29)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
nosoop
Veteran Member
Join Date: Aug 2014
Plugin ID:
5282
Plugin Version:
0.1.8
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Players speak their MvM loot responses when picking up rare weapons.
Old 07-16-2016 , 03:33   [TF2] Weapon Pickup Responses (2017-12-29)
Reply With Quote #1

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
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 12-29-2017 at 10:06. Reason: I have trouble remembering ${CURRENT_YEAR}.
nosoop 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 13:27.


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