AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   list of predefined VGUIMenu id's (https://forums.alliedmods.net/showthread.php?t=194004)

sickM0nkey 08-24-2012 12:23

list of predefined VGUIMenu id's
 
Hello && sorry about my English

I need to detect when player reaches SELECT TEAM MENU

For now, I have
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_message(get_user_msgid("VGUIMenu"), "detectTeamSelect"); } publuic detectTeamSelect() {     // menu id     // if(get_msg_arg_int(1) == ?) }

Where can I find list of predefined VGUIMenu id's so I can use them with get_msg_arg_int()?

How to do same with old style menus? I know, that I can use ShowMenu event instead of VGUIMenu, but then where can I find all returning menu messages (If they are called like that), like #Team_Select, #IG_Team_Select

ty!

NiHiLaNTh 08-24-2012 12:46

Re: list of predefined VGUIMenu id's
 
debug and you'll see the index!

Edit.

Spoiler

sickM0nkey 08-24-2012 13:27

Re: list of predefined VGUIMenu id's
 
Weird, when I join game with Old Style Menu, and check get_msg_arg_string(4, MenuCode) then MenuCode is empty string (checking with if(MenuCode[0]) before MenuCode printing), but when I try change team from in game it sets correct value - #IG_Team_Select

why it is emty string not #Team_Select

NiHiLaNTh 08-24-2012 14:49

Re: list of predefined VGUIMenu id's
 
lol I didn't read the whole post, anyway, for the old style menus search inside titles.txt. There are all needed menu title names.

Quote:

get_msg_arg_string(4, MenuCode)



It's a string, so it should be like that

Code:

new MenuCode[ 32 ];
get_msg_arg_string( 4, MenuCode, charsmax( MenuCode ) );


sickM0nkey 08-24-2012 15:12

Re: list of predefined VGUIMenu id's
 
Quote:

Originally Posted by NiHiLaNTh (Post 1781592)
It's a string, so it should be like that

Code:

new MenuCode[ 32 ];
get_msg_arg_string( 4, MenuCode, charsmax( MenuCode ) );


ye, but it did not return Team_Select on first join, weird! String is empty. Team_Select is only value, that is not set.


All times are GMT -4. The time now is 05:41.

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