I'm trying to hook when player buys primary or secondary ammo through oldstyle buymenu. Currently i'm hooking these:
PHP Code:
register_clcmd("buyammo1","blockAmmo1")
register_clcmd("buyammo2","blockAmmo2")
register_clcmd("primammo","blockAmmo1")
register_clcmd("secammo","blockAmmo2")
Everything is working fine with console commands and vgui buymenu. But when i buy ammo through the oldstyle buy menu, it doesn't catch it. Is there a another command for buying ammo? I was able to hook when player opens the oldstyle buymenu, but i got no idea how to check what item he selects from the menu, and i don't want to remake the whole oldstyle buymenu...
Thanks.