Hi I try to disable the panorama team menu and bind the M key ?
Here is what I tried but is seems not to work.
Code:
HookUserMessage(GetUserMessageId("VGUIMenu"), TeamMenuHook, true);
public Action TeamMenuHook(UserMsg msg_id, Protobuf msg, const int[] players, int playersNum, bool reliable, bool init)
{
char buffermsg[64];
msg.ReadString("name", buffermsg, sizeof(buffermsg));
if(StrEqual(buffermsg, "info"))
{
return Plugin_Stop;
}
if (StrEqual(buffermsg, "team"))
{
PrintToServer("------- [DEBUG] VGUI m pressed.");
int client = players[0];
RequestFrame(show_team_menu, GetClientUserId(client)); // this is a custom menu that I want to use
return Plugin_Stop;
}
PrintToServer("------- [DEBUG] %s.",buffermsg);
return Plugin_Continue;
}
Anyone has any ideea why the Plugin_Stop is not stopping the menu from appearing ?