AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hide menus (https://forums.alliedmods.net/showthread.php?t=133181)

Nyuszy 07-22-2010 16:28

hide menus
 
how can i hide team select and class select menu on connect?

Kreation 07-22-2010 17:05

Re: hide menus
 
Search.

I believe ConnorMcLeod made something exactly for this purpose.

Nyuszy 07-22-2010 17:57

Re: hide menus
 
sry, but i don't find anything that can help me

fysiks 07-22-2010 18:32

Re: hide menus
 
auto team join?

Alucard^ 07-22-2010 23:15

Re: hide menus
 
Yes fysiks, but if you don't want to auto join people when connect, but you want to disable the default menu? For example to put another menu there, created by you.

I need this too... i know a method but i think can be better... cuz if i am not wrong, depends of the type of menu that the player is using (old or new style).

fysiks 07-22-2010 23:20

Re: hide menus
 
Auto join to spectator. Display your menu. Just a thought.

Nyuszy 07-23-2010 16:06

Re: hide menus
 
good idea. :)
can anybody write a simple code for forcing connected players to spec?
i don't understand the Auto Join on Connect's and Team Join Management's code... :(

Alucard^ 07-23-2010 17:35

Re: hide menus
 
I used a method that is not really eficient... but in the Others subforum someone posted this:

Code:
#define TEAM_SELECT_VGUI_MENU_ID 2 public plugin_init() {      register_message(get_user_msgid("ShowMenu"),"message_show_menu")      register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu") public message_show_menu(msgid, dest, id) {     static team_select[] = "#Team_Select"     static menu_text_code[sizeof team_select]     get_msg_arg_string(4, menu_text_code, sizeof menu_text_code - 1)     if (equal(menu_text_code, team_select))         return PLUGIN_HANDLED         return PLUGIN_CONTINUE } public message_vgui_menu(msgid, dest, id)  {     if (!(get_msg_arg_int(1) != TEAM_SELECT_VGUI_MENU_ID))         return PLUGIN_HANDLED         return PLUGIN_CONTINUE }

I think is the best method.

Nyuszy 07-24-2010 11:59

Re: hide menus
 
thx for help :)

Nyuszy 07-24-2010 17:20

Re: hide menus
 
this code block only team select menu. but how can i block class select menu too?
i try this:
PHP Code:

engclient_cmd(id"jointeam""1")
engclient_cmd(id"joinclass""1"

but it change only the team...


All times are GMT -4. The time now is 00:08.

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