Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Invader Amoto
Member
Join Date: May 2009
Old 12-15-2010 , 14:38   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #11

Nice extension! Definitely useful.

How can I convert the low and high 32 bits of the global index to an integer that I can use when searching someone's backpack using the TF2 backpack items API?

Also, is it possible to get the attributes of the item that gets added to someone's backpack with just this extension?
Invader Amoto is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-16-2010 , 00:35   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #12

Quote:
Originally Posted by Invader Amoto View Post
Nice extension! Definitely useful.
Thanks.

Quote:
Originally Posted by Invader Amoto View Post
How can I convert the low and high 32 bits of the global index to an integer that I can use when searching someone's backpack using the TF2 backpack items API?
EDIT: What I said here was wrong, very wrong.

Quote:
Originally Posted by Invader Amoto View Post
Also, is it possible to get the attributes of the item that gets added to someone's backpack with just this extension?
Not yet, it's on my todo list though.
__________________

Last edited by asherkin; 12-16-2010 at 02:08.
asherkin is offline
Invader Amoto
Member
Join Date: May 2009
Old 12-16-2010 , 20:03   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #13

Quote:
Originally Posted by asherkin View Post
EDIT: What I said here was wrong, very wrong.
So then what's right?

I've tried a whole bunch of things, nothing seems to work.
Invader Amoto is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-17-2010 , 13:01   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #14

Updated to fix a memory corruption bug in the last version and actually updated the Linux plugin this time.
Thanks go to Geit for noticing the issue.
__________________
asherkin is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-18-2010 , 03:09   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #15

Gamedata updated for todays update.

EDIT:
More is broken.
__________________

Last edited by asherkin; 12-18-2010 at 04:56.
asherkin is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-18-2010 , 13:29   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #16

Yay triple-post.

Another update that fixes the item name and client index in the forward.
Gamedata + Bins this time.
__________________
asherkin is offline
Invader Amoto
Member
Join Date: May 2009
Old 12-18-2010 , 17:24   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #17

So, how do you get the item's global index? I still can't figure it out...

:'(
Invader Amoto is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-19-2010 , 01:03   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #18

Quote:
Originally Posted by Invader Amoto View Post
So, how do you get the item's global index? I still can't figure it out...

:'(
For now, you can just use low, as high is always 0 for all current items.
I think I'll have to add in a string with an already processed global index in the future though.
__________________
asherkin is offline
Invader Amoto
Member
Join Date: May 2009
Old 12-19-2010 , 18:23   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #19

Quote:
Originally Posted by asherkin View Post
For now, you can just use low, as high is always 0 for all current items.
I think I'll have to add in a string with an already processed global index in the future though.
I've tried just using low. The global index numbers don't match up at all.
Invader Amoto is offline
jockersoft
Member
Join Date: Aug 2008
Old 12-21-2010 , 09:55   Re: [TF2] BackpackHook - Forward for when an item is added to the player's inventory.
Reply With Quote #20

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.
jockersoft 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 20:44.


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