AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   TF2Items (https://forums.alliedmods.net/forumdisplay.php?f=146)
-   -   Add TF2Items_EquipPlayerWearable (https://forums.alliedmods.net/showthread.php?t=218452)

Powerlord 06-16-2013 06:08

Add TF2Items_EquipPlayerWearable
 
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).

friagram 06-17-2013 03:36

Re: Add TF2Items_EquipPlayerWearable
 
Can
I
Equip
Hats
?

Powerlord 06-17-2013 11:45

Re: Add TF2Items_EquipPlayerWearable
 
Quote:

Originally Posted by friagram (Post 1971842)
Can
I
Equip
Hats
?

They'll be invisible which would defeat the entire point.

friagram 06-17-2013 12:34

Re: Add TF2Items_EquipPlayerWearable
 
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.

Merbo 06-21-2013 16:34

Re: Add TF2Items_EquipPlayerWearable
 
I also would like this, if it helps weigh in at any amount.


All times are GMT -4. The time now is 15:24.

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