Raised This Month: $12 Target: $400
 3% 

Panorma menu csgo


Post New Thread Reply   
 
Thread Tools Display Modes
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
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 08-12-2019 , 18:03   Re: Panorma menu csgo
Reply With Quote #2

https://sm.alliedmods.net/new-api/usermessages/MsgHook

Quote:
Ignored for normal hooks. For intercept hooks, Plugin_Handled blocks the message from being sent, and Plugin_Continue resumes normal functionality.
Maxximou5 is offline
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-13-2019 , 20:21   Re: Panorma menu csgo
Reply With Quote #3

What is the message for the team menu ?
If I use GetUserMessageId("VGUIMenu") when the user presses M the event is not triggered.

I can for example to force the player to press ESC when the team menu pops up and then show my custom menu but I can't find the event where the team menu is shown.
ShD3luxe is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-15-2019 , 06:35   Re: Panorma menu csgo
Reply With Quote #4

Quote:
Originally Posted by ShD3luxe View Post
What is the message for the team menu ?
If I use GetUserMessageId("VGUIMenu") when the user presses M the event is not triggered.

I can for example to force the player to press ESC when the team menu pops up and then show my custom menu but I can't find the event where the team menu is shown.
Because there is no event, nothing is possible since panorama
Indarello is offline
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-15-2019 , 13:34   Re: Panorma menu csgo
Reply With Quote #5

Ok, thank you.
ShD3luxe is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:58.


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