Hello!
Help me please.
How to block buymenu command?
It's not work:
Code:
public OnPluginStart()
{
HookUserMessage(GetUserMessageId("VGUIMenu"),HookUserMessages,true);
}
public Action:HookUserMessages(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
{
decl String:type[10];
BfReadString(bf, type, sizeof(type));
if (StrEqual(type, "buymenu"))
{
PrintToChatAll("blocked");
//OpenBuyMenu(client);
return Plugin_Handled;
}
return Plugin_Continue;
}
Why dont work? Help me please.