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

[TF2] BackpackHook - Forward for when an item is added to the player's inventory.


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-21-2010 , 10:18   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #21

Quote:
Originally Posted by jockersoft View Post
can you detect when items are removed from a player inventory?

right now in a trade there's no way to know the player who gave an item, only who received it.
Yes, but not as much info is available.
What sort of info about the item being removed are you after?
__________________
asherkin is offline
jockersoft
Member
Join Date: Aug 2008
Old 12-21-2010 , 10:56   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #22

what I'd like to do is tracking trades between players in the same server.

So for me it's not important to have a OnItemRemovedFromInventory forward with a lot of parameters like OnItemAddedToInventory has, I just need to know the client and globalIndex, everything else can be read later from the OnItemAddedToInventory fired by the player that receives the trade.
jockersoft is offline
Invader Amoto
Member
Join Date: May 2009
Old 12-21-2010 , 14:54   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #23

Yeah I'd love something like this, too. And the attributes of the added items.
Invader Amoto is offline
moiph
Junior Member
Join Date: Mar 2009
Location: Seattle, WA
Old 12-29-2010 , 19:35   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #24

So I'm trying to load this and I'm seeing:

Code:
[SM] Extension weaponannouncer.ext.so failed to load: InventoryOffset borked up D:

Last edited by moiph; 12-29-2010 at 20:28.
moiph is offline
Send a message via AIM to moiph
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-29-2010 , 23:29   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #25

Quote:
Originally Posted by moiph View Post
So I'm trying to load this and I'm seeing:

Code:
[SM] Extension weaponannouncer.ext.so failed to load: InventoryOffset borked up D:
That means that it didn't find it in the gamedata file, maybe it got corrupted when you uploaded it to your server?
Remember that you need to restart your server for changes to gamedata files to take effect (after the first load of that file).
__________________
asherkin is offline
moiph
Junior Member
Join Date: Mar 2009
Location: Seattle, WA
Old 12-30-2010 , 00:57   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #26

Restarting the server worked. Thanks (Didn't wanna try to do that earlier as it was full)
moiph is offline
Send a message via AIM to moiph
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-10-2011 , 12:26   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #27

Quote:
Originally Posted by jockersoft View Post
what I'd like to do is tracking trades between players in the same server.

So for me it's not important to have a OnItemRemovedFromInventory forward with a lot of parameters like OnItemAddedToInventory has, I just need to know the client and globalIndex, everything else can be read later from the OnItemAddedToInventory fired by the player that receives the trade.
I've been doing some research on how the trading system works, and it doesn't look like this will be possible.

As far as I've been able to tell, the item will have a new global index when added to the receiver's backpack.
__________________
asherkin is offline
jockersoft
Member
Join Date: Aug 2008
Old 01-11-2011 , 07:08   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #28

Ah, that's unfortunate.
you mentioned the game exposes only limited info when an item is removed. What data is available?
jockersoft is offline
ltgenkd
AlliedModders Donor
Join Date: Sep 2008
Old 02-27-2011 , 00:38   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #29

Quote:
Originally Posted by asherkin View Post
I plan to release the new plugin / web UI once I am satisfied that no more breaking database changes need to be made and that their are no major bugs.
Any release news yet on the Web UI?
__________________
ltgenkd is offline
Invader Amoto
Member
Join Date: May 2009
Old 03-05-2011 , 20:43   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #30

globalIndex_string in the forward seems to only contain the sourcemod version thats running. :/

Also, I'd be very interested in a forward that fires when someone has an item removed or traded away, even if it only returns the client index.
Invader Amoto 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 19:55.


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