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

Is there any method to hook adding ammo in backpack?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 11-20-2022 , 13:24   Is there any method to hook adding ammo in backpack?
Reply With Quote #1

Is there any method to hook adding ammo in backpack? I've tried to use RegisterHam(Ham_Item_AddToPlayer, "weapon_flashbang", "Ham_Item_AddToPlayer_Post", true); but it works only when player gets their first flashbang in inventory. The second one is ignored
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951
kww is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 11-20-2022 , 14:11   Re: Is there any method to hook adding ammo in backpack?
Reply With Quote #2

https://wiki.alliedmods.net/Half-lif...nts#AmmoPickup

https://wiki.alliedmods.net/CS_Weapons_Information for ammo id
jimaway is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 11-20-2022 , 21:41   Re: Is there any method to hook adding ammo in backpack?
Reply With Quote #3

It seems I can't use it for flashbangs but I'm not sure so I'll try

upd: It doesn't fit for me I'm working with weapon entity but I can't get its id within this message (probably because I don't know how to get it)
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 11-21-2022 at 06:40.
kww is offline
Reply


Thread Tools
Display Modes

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 01:12.


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