The lock can be bypassed by using the Vgui menus (setinfo "_vgui_menus" "1")
Is there any way to prevent that?
Edit: Found a solution myself. Add this to force the old style menu on players while picking teams
PHP Code:
public plugin_init() {
register_message(get_user_msgid("VGUIMenu"), "prevent_vgui_menu")
}
public prevent_vgui_menu(msgid, dest, id)
{
if (get_msg_arg_int(1) == 2 )
{
set_user_info(id, "_vgui_menus", "0")
client_cmd(id, "chooseteam")
}
else {
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}