Hooking Buy Command
For some reason the hooks on the buy command don't work, did i do something wrong ?
And yes, i am in the buy zone when calling the commands Seems like VGUI menu opens fine, even after returning the command handled, also there is no print chat message Using the latest dev version PHP Code:
|
Re: Hooking Buy Command
It can't be hooked like that. See this - https://forums.alliedmods.net/showthread.php?t=149380
|
Re: Hooking Buy Command
Ahm, fml... guess im gonna forget about my fancy buy menu and just remove the buy zone.. thanks
|
Re: Hooking Buy Command
i know you tag the post as solved, but i want to tel you this i saw in a code and it was working acctualy the buymenu was closed and one in the code replace it but it may not considre as an slowhack :
Spoiler
|
Re: Hooking Buy Command
You want to block the buy menu? Without removing the buy zone you can hook "StatusIcon" message, filter for "buyzone" and alter m_fClientMapZone offset(234 or 235, can't remember) by removing CS_MAPZONE_BUY flag.
|
Re: Hooking Buy Command
What i wanted to do actually was to block the vgui menu and all buy commands, and open another menu instead by pressing the "b" button while in the buy zone
|
Re: Hooking Buy Command
1 Attachment(s)
try what i gived you :/
btw, this is the code that use "b" to open |
Re: Hooking Buy Command
The solution that I proposed does exactly that. From the message function simply open your custom menu.
|
Re: Hooking Buy Command
I guess this is what you meant, but the message is printed every one second while in the buy zone.. how am i supposed to trigger it only when the "b" button is pressed ?
PHP Code:
|
Re: Hooking Buy Command
Then create an on-off system, like a bool which is set to true the first time when message is fired and set to false when user go out of buyzone. There are other solutions too, like blocking buy commands.
|
| All times are GMT -4. The time now is 18:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.