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

[TF2] Getting CEconItemView


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 02-15-2016 , 21:58   [TF2] Getting CEconItemView
Reply With Quote #1

CTFPlayer::ReapplyItemUpgrades takes in a CTFPlayer and a CEconItemView as parameters.

From an item entity index returned by TF2Items_GiveNamedItem, is there a way to get the CEconItemView of that item to pass into that function?

Some people told me that's only accessible from an extension only, but I noticed here that psychonic managed to be able to send in a CEconItemView to CTFDroppedWeapon::Create.

CTFPlayer::ReapplyItemUpgrades is called in MvM to apply upgrades purchased from the upgrades station to the players' weapons. I want to call this after an item from TF2Items is generated since GiveNamedItem doesn't call CTFPlayer::ReapplyItemUpgrades (and therefore, when a player respawns, the upgrades don't *always* appear on the item given by TF2Items).

So something like this would occur in the plugin:

PHP Code:
int ItemEntity TF2Items_GiveNamedItem(clienthItem);
CloseHandle(hItem);
SDKCall(ReapplyItemUpgradesclient, ????); 
The ???? is the CEconItemView. What do I put in there? Also, how do I prep the sdkcall for this function? (I have the gamedata already.) Any insight or advice would be helpful. Thanks!
Potato Uno is offline
 



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


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