AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Panorma menu csgo (https://forums.alliedmods.net/showthread.php?t=318040)

ShD3luxe 08-10-2019 12:24

Panorma menu csgo
 
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 ?

Maxximou5 08-12-2019 18:03

Re: Panorma menu csgo
 
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.

ShD3luxe 08-13-2019 20:21

Re: Panorma menu csgo
 
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.

Indarello 08-15-2019 06:35

Re: Panorma menu csgo
 
Quote:

Originally Posted by ShD3luxe (Post 2663130)
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

ShD3luxe 08-15-2019 13:34

Re: Panorma menu csgo
 
Ok, thank you.


All times are GMT -4. The time now is 02:25.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.