AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is there any method to hook adding ammo in backpack? (https://forums.alliedmods.net/showthread.php?t=340466)

kww 11-20-2022 13:24

Is there any method to hook adding ammo in backpack?
 
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

jimaway 11-20-2022 14:11

Re: Is there any method to hook adding ammo in backpack?
 
https://wiki.alliedmods.net/Half-lif...nts#AmmoPickup

https://wiki.alliedmods.net/CS_Weapons_Information for ammo id

kww 11-20-2022 21:41

Re: Is there any method to hook adding ammo in backpack?
 
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)


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

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