View Single Post
Author Message
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-10-2019 , 12:24   Panorma menu csgo
Reply With Quote #1

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 ?

Last edited by ShD3luxe; 08-10-2019 at 12:25. Reason: add code
ShD3luxe is offline