First of all you should learn about messages code using. According to
Half-Life 1 Game Events - AlliedModders Wiki:
Code:
ShowMenu
This message displays a "menu" to a player (text on the left side of the screen). It acts like AMXX's show_menu (in fact, this is how AMXX shows a menu).
Note: Multipart should be 1 if your menu takes up multiple messages (i.e.: string is too big to fit into one). On the final message, Multipart should be 0.
Structure:
short KeysBitSum
char Time
byte Multipart
string Text
Code:
VGUIMenu
This message displays a predefined VGUI menu.
Structure:
byte MenuID
short KeysBitSum
char Time?
byte Multipart?
string Name?
PHP Code:
get_msg_arg_string(4, message, charsmax(message)) // I do not understand
Get 4th message argument, it is 'Text'.
PHP Code:
if(equal(message, g_hook_args[i])) // I do not understand
Then check it against defined set of aliases ("#Team_Select", "#Team_Select_Spect", "#IG_Team_Select" or "#IG_Team_Select_Spect"; see 'titles.txt' in mod directory, hash sign is mandatory symbol to indicate an alias). The purpose is to determine whether it is one of 'Team Selection' menus.
VGUI menu message has other structure and so the code for determination is other one but for the same purpose.
PHP Code:
new menuid = get_msg_arg_int(1) // I do not understand
Get 1st message argument, it is 'MenuID'.
PHP Code:
if(menuid == 2 || menuid == 3) // I do not understand :c
Now we check against well-known menu ids whether it is
Menu_ChooseTeam or
Menu_IGChooseTeam. You could see all of them
here.
__________________