Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
Cannont become in spectator
- ОС
- Linux
- Amx Mod X
-
1.10.0 last version
- Билд
-
3.7.0.695-dev
- ReGamedll
-
5.15.0.458-dev
- Версия Metamod
-
v1.3.0.128, API (5:13
- Список метамодулей
-
not need
- Список плагинов
-
not need
- Автор плагина
- fantom
- Версия плагина
- 2.8
- Исходный код
-
#include < amxmodx >
#include < reapi >
#define PLUGIN "Team Select"
new const VERSION[] = "2.8";
#define AUTHOR "fantom"
#pragma semicolon 1
new const MENU_CONTENT[ ] =
{
"^t^t^t^t\rServer CS^n\
^t^t^t^t\yChose Team^n^n\
^t^t^t^t\y1. \wTerrorist^n\
^t^t^t^t\y2. \wCounter-Terrorist^n^n\
^t^t^t^t\y5. \wDefault^n\
^t^t^t^t\y6. \wSpectator^n^n\
^t^t^t^t\y0. \wExit"
};
new HookChain: g_hookShowMenu;
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHookChain( RG_ShowVGUIMenu, "hook_ShowVGUIMenu", .post = false );
RegisterHookChain( RG_HandleMenu_ChooseTeam, "hook_HandleMenuChooseTeamPre", .post = false );
RegisterHookChain( RG_HandleMenu_ChooseTeam, "hook_HandleMenuChooseTeamPost", .post = true );
DisableHookChain( g_hookShowMenu = RegisterHookChain( RG_ShowMenu, "hook_ShowMenu", .post = false ) );
}
public hook_ShowVGUIMenu( const id, VGUIMenu: menuType, const bitsSlots, const szOldMenu[ ] )
{
if( menuType != VGUI_Menu_Team )
{
return HC_CONTINUE;
}
set_member( id, m_bForceShowMenu, true );
SetHookChainArg( 3, ATYPE_INTEGER, MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_5 | MENU_KEY_6 );
SetHookChainArg( 4, ATYPE_STRING, MENU_CONTENT );
EnableHookChain( g_hookShowMenu );
return HC_CONTINUE;
}
public hook_HandleMenuChooseTeamPre( const id, const MenuChooseTeam: slot )
{
if( is_user_alive( id ) )
{
user_silentkill( id );
}
set_member_game( m_bSkipShowMenu, true );
}
public hook_HandleMenuChooseTeamPost( const id, const MenuChooseTeam: slot )
{
set_member( id, m_bTeamChanged, false );
set_member_game( m_bSkipShowMenu, false );
set_member( id, m_iMenu, Menu_ChooseAppearance );
rg_internal_cmd( id, "joinclass", "5" );
}
public hook_ShowMenu( const id, const bitsSlots, const iDisplayTime, const iNeedMore, pszText[ ] )
{
DisableHookChain( g_hookShowMenu );
show_menu( id, bitsSlots, pszText, iDisplayTime );
set_member( id, m_iMenu, Menu_ChooseTeam );
return HC_SUPERCEDE;
}
Hello i tell author for this bug cannonct in spectator he write creat one topic dont remove this topic i dont have problem author know this bug