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

Add TF2Items_EquipPlayerWearable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-16-2013 , 06:08   Add TF2Items_EquipPlayerWearable
Reply With Quote #1

As you already know, weapons can be equipped by using the EquipPlayerWeapon function.

However, this doesn't work for any equippable items that aren't weapons, which is all items of the classes tf_wearable, tf_wearable_demoshield, and tf_powerup_bottle.

Since TF2 has a function for this on CBasePlayer and pretty much every plugin using TF2Items that wants to give out Soldier boots, DemoMan shields, or Sniper shields needs this function, I propose adding a wrapper for this function into TF2Items itself.

It basically just needs to be a wrapper around CBasePlayer::EquipWearable, which is currently offsets 424 Windows and 425 Linux/Mac in the player offsets.

Alternately, I could file this bug on AlliedModders to get it added to the tf2 extension or sdktools_functions if it's a multi-game thing (i.e. also used in DOTA2; CS:GO has it in CBaseCombatCharacter, but I don't think CS:GO actually uses wearables).
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-21-2013 at 16:41.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-17-2013 , 03:36   Re: Add TF2Items_EquipPlayerWearable
Reply With Quote #2

Can
I
Equip
Hats
?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-17-2013 , 11:45   Re: Add TF2Items_EquipPlayerWearable
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
Can
I
Equip
Hats
?
They'll be invisible which would defeat the entire point.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-17-2013 , 12:34   Re: Add TF2Items_EquipPlayerWearable
Reply With Quote #4

This was a joke. Though i have noticed tf2items generated weapons becoming visible when the item servers are down, or when the server first comes online.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Merbo
Member
Join Date: Jul 2012
Old 06-21-2013 , 16:34   Re: Add TF2Items_EquipPlayerWearable
Reply With Quote #5

I also would like this, if it helps weigh in at any amount.
Merbo is offline
Reply



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 21:44.


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