AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Buyammo in old buymenu (https://forums.alliedmods.net/showthread.php?t=89668)

shine771 04-09-2009 08:15

Buyammo in old buymenu
 
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.

ConnorMcLeod 04-09-2009 13:11

Re: Buyammo in old buymenu
 
see my plugin bpammo features http://forums.alliedmods.net/showthread.php?p=720161
Or restweapon plugin.


All times are GMT -4. The time now is 02:20.

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