GrafkO
Пользователь
- Регистрация
- 9 Июн 2017
- Сообщения
- 71
- Симпатии
- 6
- Пол
- Мужской
Всем привет,народ подскажите может кто сталкивался.
Ищу нормальный плагин который разрешает пользоваться микрофон после того ,как ты набиваешь 50 фрагов к примеру желательно чтоб была иммунка.
Находил на форуме плагин,но он что то не работает хз почему...
p.s. А то школота надоела уже трещать в микрофон ...
Ищу нормальный плагин который разрешает пользоваться микрофон после того ,как ты набиваешь 50 фрагов к примеру желательно чтоб была иммунка.
Находил на форуме плагин,но он что то не работает хз почему...
p.s. А то школота надоела уже трещать в микрофон ...
name version author file status
[ 1] DopBan 3.0.1b kanagava dop_ban.amxx running
[ 2] Advanced Gag 1.9.0a neygomon amx_gag.amxx running
[ 3] FreshBans 1.3.6 kanagava fresh_bans_136. running
[ 4] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 5] AES: StatsX 0.5.1 Vega serfreeman1337 aes_statsx_cstr running
[ 6] Admin Loader 2.6.2 neygomon admin_loader.am running
[ 7] [ReAPI] AMX Reload Adm 0.1 pUzzlik re_amx_reloadad running
[ 8] ReAimDetector API 0.1.8 ReHLDS Team reaimdetector.a running
[ 9] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 10] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 11] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 12] Advanced MapChooser 1.1.0 neygomon map_chooser2.am running
[ 13] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 14] Menus Front-End 1.5 neugomon menufront_end.a running
[ 15] Players Menu 1.7 neugomon players_menu2cf running
[ 16] Best player of the rou 0.1 F@nt0M best_player_of_ running
[ 17] Round Sound 0.1 XyLiGaN aroundsound.amx running
[ 18] [ReAPI] AWPoff 1.3 PAffAEJIkA :3 awp_off1.3.amxx running
[ 19] Example AWPOff 1337 PAffAEJIkA :3 example_gold_aw running
[ 20] [ReAPI] Slay Loosers 1.1 neugomon reapi_slayloose running
[ 21] RE Vampire 1.0.2 MakapoH, AcE re_vampire_last running
[ 22] Respawn Players 1.0 Alienware spawn.amxx running
[ 23] DHUD_Adverts_Deads 1.3.1 pUzzlik HUD_puz.amxx running
[ 24] Advert Messages 1.22 neygomon adverts.amxx running
[ 25] Block Advert 1.4 neygomon block_advert.am running
[ 26] SexBomb 1.0 csp.admin c4_girlbomb.amx running
[ 27] ScreenMaker 1.1 neygomon screen_maker.am running
[ 28] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 29] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 30] Lite Recoder 1.0.1 neygomon amx_demorec_3.a running
[ 31] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 32] Admin_Check 0.1 CepeH9 online.amxx running
[ 33] [ReAPI] KiLL Assist 1.1 neugomon reapi_kill_assi running
[ 34] Ping Control 1.31 neygomon Ping_Control.am running
[ 35] [ReAPI] Knife Round 1.3.d pUzzlik knife_round.amx running
[ 36] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 37] [ReApi] Killer ScreenF 0.0.4 Vaqtincha reapi_killer_sc running
[ 38] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 39] Parachute 1.1 maeStro | neygom free_parachute. running
[ 40] GameName Changer 1.0 neugomon gamename_change running
[ 41] New Plugin 1.0 Stimul save_hp.amxx running
[ 42] [ReAPI] Say me/hp 1.4 neygomon sayme.amxx running
[ 43] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash_f running
[ 44] Weapon Restrict 1.7 s1lent weapon_rest.amx running
[ 45] [ReAPI] Round Balancer 1.1 neygomon round_balancer. running
[ 46] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 47] Lite Translit 2.8 neygomon lite_translit_f running
[ 48] [ReVIP] System Core 2.5 full pUzzlik re_vip_core.amx running
[ 49] [ReVIP] Menu 2.3 full pUzzlik re_vip_menu.amx running
[ 50] [ReVIP] Connected Info 2.5 full pUzzlik re_vip_connect_ running
[ 51] [ReVIP] Tab Info 2.5 full pUzzlik re_vip_tab_info running
[ 52] [ReVIP] Damager 2.5 full pUzzlik re_vip_damager. running
[ 53] [ReVIP] Reload Weapons 2.5 full pUzzlik re_vip_reload_w running
[ 54] [ReVIP] Custom Shop 2.5 full pUzzlik re_vip_shop.amx debug
[ 55] [ReVIP] Custom AK-47 2.3 full pUzzlik re_vip_custom_a running
[ 56] [ReVIP] Custom M4A1 2.3 full pUzzlik re_vip_custom_m running
[ 57] [ReVIP] Custom AWP 2.3 full pUzzlik re_vip_custom_a running
[ 58] [ReVIP] Custom Scout 2.3 full pUzzlik re_vip_custom_s running
[ 59] [ReVIP] Custom Deagle 2.3 full pUzzlik re_vip_custom_d running
[ 60] [ReVIP] Custom USP 2.3 full pUzzlik re_vip_custom_u running
[ 61] [ReVIP] Custom Scout 2.3 full pUzzlik re_vip_custom_f running
[ 62] [ReVIP] Custom Knife 2.3 full pUzzlik re_vip_custom_k running
[ 63] Advanced Experience Sy 0.5.1 Vega serfreeman1337 aes_main.amxx running
[ 64] AES: CStrike Addon 0.5.1 Vega serfreeman1337 aes_exp_cstrike running
[ 65] AES: Informer 0.5.1 Vega serfreeman1337 & aes_informer.am running
[ 66] AES: Admin Tools 0.5.1 Vega serfreeman1337 & aes_exp_editor. running
[ 67] AES: Bonus System 0.5.1 Vega serfreeman1337 aes_bonus_syste running
[ 68] AES: Bonus CSTRIKE 0.5.1 Vega serfreeman1337 aes_bonus_cstri running
68 plugins, 68 running
[ 1] DopBan 3.0.1b kanagava dop_ban.amxx running
[ 2] Advanced Gag 1.9.0a neygomon amx_gag.amxx running
[ 3] FreshBans 1.3.6 kanagava fresh_bans_136. running
[ 4] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 5] AES: StatsX 0.5.1 Vega serfreeman1337 aes_statsx_cstr running
[ 6] Admin Loader 2.6.2 neygomon admin_loader.am running
[ 7] [ReAPI] AMX Reload Adm 0.1 pUzzlik re_amx_reloadad running
[ 8] ReAimDetector API 0.1.8 ReHLDS Team reaimdetector.a running
[ 9] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 10] Admin Votes 1.8.3-Re AMXX Dev Team adminvote.amxx running
[ 11] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 12] Advanced MapChooser 1.1.0 neygomon map_chooser2.am running
[ 13] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 14] Menus Front-End 1.5 neugomon menufront_end.a running
[ 15] Players Menu 1.7 neugomon players_menu2cf running
[ 16] Best player of the rou 0.1 F@nt0M best_player_of_ running
[ 17] Round Sound 0.1 XyLiGaN aroundsound.amx running
[ 18] [ReAPI] AWPoff 1.3 PAffAEJIkA :3 awp_off1.3.amxx running
[ 19] Example AWPOff 1337 PAffAEJIkA :3 example_gold_aw running
[ 20] [ReAPI] Slay Loosers 1.1 neugomon reapi_slayloose running
[ 21] RE Vampire 1.0.2 MakapoH, AcE re_vampire_last running
[ 22] Respawn Players 1.0 Alienware spawn.amxx running
[ 23] DHUD_Adverts_Deads 1.3.1 pUzzlik HUD_puz.amxx running
[ 24] Advert Messages 1.22 neygomon adverts.amxx running
[ 25] Block Advert 1.4 neygomon block_advert.am running
[ 26] SexBomb 1.0 csp.admin c4_girlbomb.amx running
[ 27] ScreenMaker 1.1 neygomon screen_maker.am running
[ 28] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 29] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 30] Lite Recoder 1.0.1 neygomon amx_demorec_3.a running
[ 31] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 32] Admin_Check 0.1 CepeH9 online.amxx running
[ 33] [ReAPI] KiLL Assist 1.1 neugomon reapi_kill_assi running
[ 34] Ping Control 1.31 neygomon Ping_Control.am running
[ 35] [ReAPI] Knife Round 1.3.d pUzzlik knife_round.amx running
[ 36] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 37] [ReApi] Killer ScreenF 0.0.4 Vaqtincha reapi_killer_sc running
[ 38] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 39] Parachute 1.1 maeStro | neygom free_parachute. running
[ 40] GameName Changer 1.0 neugomon gamename_change running
[ 41] New Plugin 1.0 Stimul save_hp.amxx running
[ 42] [ReAPI] Say me/hp 1.4 neygomon sayme.amxx running
[ 43] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash_f running
[ 44] Weapon Restrict 1.7 s1lent weapon_rest.amx running
[ 45] [ReAPI] Round Balancer 1.1 neygomon round_balancer. running
[ 46] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 47] Lite Translit 2.8 neygomon lite_translit_f running
[ 48] [ReVIP] System Core 2.5 full pUzzlik re_vip_core.amx running
[ 49] [ReVIP] Menu 2.3 full pUzzlik re_vip_menu.amx running
[ 50] [ReVIP] Connected Info 2.5 full pUzzlik re_vip_connect_ running
[ 51] [ReVIP] Tab Info 2.5 full pUzzlik re_vip_tab_info running
[ 52] [ReVIP] Damager 2.5 full pUzzlik re_vip_damager. running
[ 53] [ReVIP] Reload Weapons 2.5 full pUzzlik re_vip_reload_w running
[ 54] [ReVIP] Custom Shop 2.5 full pUzzlik re_vip_shop.amx debug
[ 55] [ReVIP] Custom AK-47 2.3 full pUzzlik re_vip_custom_a running
[ 56] [ReVIP] Custom M4A1 2.3 full pUzzlik re_vip_custom_m running
[ 57] [ReVIP] Custom AWP 2.3 full pUzzlik re_vip_custom_a running
[ 58] [ReVIP] Custom Scout 2.3 full pUzzlik re_vip_custom_s running
[ 59] [ReVIP] Custom Deagle 2.3 full pUzzlik re_vip_custom_d running
[ 60] [ReVIP] Custom USP 2.3 full pUzzlik re_vip_custom_u running
[ 61] [ReVIP] Custom Scout 2.3 full pUzzlik re_vip_custom_f running
[ 62] [ReVIP] Custom Knife 2.3 full pUzzlik re_vip_custom_k running
[ 63] Advanced Experience Sy 0.5.1 Vega serfreeman1337 aes_main.amxx running
[ 64] AES: CStrike Addon 0.5.1 Vega serfreeman1337 aes_exp_cstrike running
[ 65] AES: Informer 0.5.1 Vega serfreeman1337 & aes_informer.am running
[ 66] AES: Admin Tools 0.5.1 Vega serfreeman1337 & aes_exp_editor. running
[ 67] AES: Bonus System 0.5.1 Vega serfreeman1337 aes_bonus_syste running
[ 68] AES: Bonus CSTRIKE 0.5.1 Vega serfreeman1337 aes_bonus_cstri running
68 plugins, 68 running
[ 1] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 3] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.3 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.672 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[10] ReAimDetector RUN - reaimdetector_am v0.1.7 pl5 ANY Never
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R pl5 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl5 ANY ANY
[13] MySQL RUN - mysql_amxx_i386. v1.8.3-R pl5 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl5 ANY Never
[15] Engine RUN - engine_amxx_i386 v1.8.3-R pl5 ANY ANY
[16] Fun RUN - fun_amxx_i386.so v1.8.3-R pl5 ANY ANY
[17] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl5 ANY ANY
17 plugins, 17 running
[ 2] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 3] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.3 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.672 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[10] ReAimDetector RUN - reaimdetector_am v0.1.7 pl5 ANY Never
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R pl5 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl5 ANY ANY
[13] MySQL RUN - mysql_amxx_i386. v1.8.3-R pl5 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl5 ANY Never
[15] Engine RUN - engine_amxx_i386 v1.8.3-R pl5 ANY ANY
[16] Fun RUN - fun_amxx_i386.so v1.8.3-R pl5 ANY ANY
[17] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl5 ANY ANY
17 plugins, 17 running
// *************************************************************************************//
// Плагин загружен с www.neugomon.ru //
// Автор: Neygomon [ https://neugomon.ru/members/1/ ] //
// Официальная тема поддержки: https://neugomon.ru/threads/2883/ //
// При копировании материала ссылка на сайт www.neugomon.ru ОБЯЗАТЕЛЬНА! //
// *************************************************************************************//
#include <amxmodx>
#include <fakemeta>
#include <reapi>
/*
Settings
*/
#define VOICE_BY_STATS 3
// 0 - disabled function
// 1 - ranks by damage (https://neugomon.ru/threads/2743/)
// 2 - csstats mysql (CsStats MySQL)
// 3 - AES (Панель для управления сервером на VDS)
// 4 - default stats (included CSstatsX SQL by SerFreeman1337 Доработка плагина)
#define MIN_LEVEL 3
// Минимальный уровень для доступа к чату при использовании VOICE_BY_STATS 1 или VOICE_BY_STATS 3
#define MIN_FRAGS 10
// Минимальный порог фрагов для доступа к чату
#define ADMIN_ALLOW_VOICE ADMIN_MENU
// Иммунитет к функции ограничения чата по статистике
// #define VOICE_IN_TEAM
// Разделять голосовой чат на команды
// #define ALIVE_DEAD_CHAT
// Разделять чат на живой и мервый
// #define ADMIN_ALLCHAT ADMIN_BAN
// Админы слышат весь чат
// Работает, только если включен VOICE_IN_TEAM
// Доступ к "прослушке" всего чата ADMIN_BAN
// #define DEAD_ALLCHAT
// Мертвые слышат всех
// Работает, только если включен ALIVE_DEAD_CHAT
/*
End settings
*/
#if VOICE_BY_STATS > 0
new g_bitAllowVoice;
#if VOICE_BY_STATS == 1
native rd_get_user_level(index);
#endif
#if VOICE_BY_STATS == 2
native csstats_get_user_stats(index, stats[]);
#endif
#if VOICE_BY_STATS == 3
native aes_get_player_stats(index, data[]);
#endif
#if VOICE_BY_STATS == 4
native get_user_stats(index, stats[], bodyhits[]);
#endif
#endif
#if defined ALIVE_DEAD_CHAT
new g_bitAlive;
#else
#if defined DEAD_ALLCHAT
#undef DEAD_ALLCHAT
#endif
#endif
#if defined VOICE_IN_TEAM
new TeamName:g_iPlayerTeam[33];
#else
#if defined ADMIN_ALLCHAT
#undef ADMIN_ALLCHAT
#endif
#endif
#if defined ADMIN_ALLCHAT
forward client_admin(index, flags);
new g_bitAllChat;
#endif
#define get_bit(%1,%2) (%1 & (1 << (%2 & 31)))
#define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
#define clr_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
public plugin_init()
{
register_plugin("Voice Management", "1.0.4", "neugomon");
#if defined ALIVE_DEAD_CHAT
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true);
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true);
#endif
#if defined VOICE_IN_TEAM
register_clcmd("joinclass", "CheckUserTeam");
register_clcmd("menuselect", "CheckUserTeam");
#endif
register_forward(FM_Voice_SetClientListening, "Voice_SetClientListening_Pre", false);
#if VOICE_BY_STATS > 0
RegisterHookChain(RG_RoundEnd, "RoundEnd_Post", true);
#endif
set_task(2.0, "Set_Alltalk");
}
public Set_Alltalk()
set_cvar_num("sv_alltalk", 1);
public client_putinserver(id)
{
#if defined ALIVE_DEAD_CHAT
clr_bit(g_bitAlive, id);
#endif
#if defined ADMIN_ALLCHAT || VOICE_BY_STATS > 0
new flags = get_user_flags(id);
#endif
#if VOICE_BY_STATS > 0
clr_bit(g_bitAllowVoice, id);
if(flags & ADMIN_ALLOW_VOICE)
set_bit(g_bitAllowVoice, id);
else set_task(1.5, "LoadPlayerStats", id);
#endif
#if defined VOICE_IN_TEAM
g_iPlayerTeam[id] = TEAM_UNASSIGNED;
#endif
#if defined ADMIN_ALLCHAT
if(flags & ADMIN_ALLCHAT)
set_bit(g_bitAllChat, id);
else clr_bit(g_bitAllChat, id);
#endif
}
#if defined ADMIN_ALLCHAT
public client_admin(id, flags)
{
#if VOICE_BY_STATS > 0
if(flags & ADMIN_ALLOW_VOICE)
set_bit(g_bitAllowVoice, id);
#endif
if(flags & ADMIN_ALLCHAT)
set_bit(g_bitAllChat, id);
else clr_bit(g_bitAllChat, id);
}
#endif
#if defined ALIVE_DEAD_CHAT
public CBasePlayer_Spawn_Post(const id)
{
if(is_user_alive(id))
set_bit(g_bitAlive, id);
else clr_bit(g_bitAlive, id);
}
public CBasePlayer_Killed_Post(const victim)
clr_bit(g_bitAlive, victim);
#endif
#if defined VOICE_IN_TEAM
public CheckUserTeam(id)
g_iPlayerTeam[id] = get_member(id, m_iTeam);
#endif
public Voice_SetClientListening_Pre(receiver, sender)
{
if(receiver == sender)
return FMRES_IGNORED;
#if VOICE_BY_STATS > 0
if(!get_bit(g_bitAllowVoice, sender))
{
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
#endif
#if defined ADMIN_ALLCHAT
if(get_bit(g_bitAllChat, receiver))
return FMRES_IGNORED;
#endif
#if defined VOICE_IN_TEAM
if(g_iPlayerTeam[sender] != g_iPlayerTeam[receiver])
{
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
#endif
#if defined DEAD_ALLCHAT
if(!get_bit(g_bitAlive, receiver))
return FMRES_IGNORED;
#endif
#if defined ALIVE_DEAD_CHAT
if(get_bit(g_bitAlive, sender) == get_bit(g_bitAlive, receiver))
return FMRES_IGNORED;
#endif
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
public RoundEnd_Post(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay)
LoadPlayerStats(0);
public LoadPlayerStats(index)
{
new players[32], pnum = 1;
if(index)
{
if(!is_user_connected(index))
return;
else players[0] = index;
}
else get_players(players, pnum, "ch");
#if VOICE_BY_STATS > 0
new stats[22];
#if VOICE_BY_STATS == 4
new bh[8];
#endif
#endif
for(new i; i < pnum; i++)
{
#if VOICE_BY_STATS == 1
stats[0] = rd_get_user_level(players);
if(stats[0] >= MIN_LEVEL)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходим ^4%d ^1уровень, у Вас ^4%d^1.", MIN_LEVEL, stats[0]);
#endif
#if VOICE_BY_STATS == 2
if(csstats_get_user_stats(players, stats) > 0)
{
if(stats[0] >= MIN_FRAGS)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходимо ^4%d ^1фрагов, у Вас ^4%d^1.", MIN_FRAGS, stats[0]);
}
#endif
#if VOICE_BY_STATS == 3
if(aes_get_player_stats(players, stats))
{
if(stats[1] >= MIN_LEVEL)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходим ^4%d ^1уровень, у Вас ^4%d^1.", MIN_LEVEL, stats[0]);
}
#endif
#if VOICE_BY_STATS == 4
if(get_user_stats(players, stats, bh))
{
if(stats[0] >= MIN_FRAGS)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходимо ^4%d ^1фрагов, у Вас ^4%d^1.", MIN_FRAGS, stats[0]);
}
#endif
}
}
stock ChatColor(const id, szMessage[], any:...)
{
new szMsg[190];
vformat(szMsg, charsmax(szMsg), szMessage, 3);
message_begin(MSG_ONE, 76, .player = id);
write_byte(id);
write_string(szMsg);
message_end();
}
// Плагин загружен с www.neugomon.ru //
// Автор: Neygomon [ https://neugomon.ru/members/1/ ] //
// Официальная тема поддержки: https://neugomon.ru/threads/2883/ //
// При копировании материала ссылка на сайт www.neugomon.ru ОБЯЗАТЕЛЬНА! //
// *************************************************************************************//
#include <amxmodx>
#include <fakemeta>
#include <reapi>
/*
Settings
*/
#define VOICE_BY_STATS 3
// 0 - disabled function
// 1 - ranks by damage (https://neugomon.ru/threads/2743/)
// 2 - csstats mysql (CsStats MySQL)
// 3 - AES (Панель для управления сервером на VDS)
// 4 - default stats (included CSstatsX SQL by SerFreeman1337 Доработка плагина)
#define MIN_LEVEL 3
// Минимальный уровень для доступа к чату при использовании VOICE_BY_STATS 1 или VOICE_BY_STATS 3
#define MIN_FRAGS 10
// Минимальный порог фрагов для доступа к чату
#define ADMIN_ALLOW_VOICE ADMIN_MENU
// Иммунитет к функции ограничения чата по статистике
// #define VOICE_IN_TEAM
// Разделять голосовой чат на команды
// #define ALIVE_DEAD_CHAT
// Разделять чат на живой и мервый
// #define ADMIN_ALLCHAT ADMIN_BAN
// Админы слышат весь чат
// Работает, только если включен VOICE_IN_TEAM
// Доступ к "прослушке" всего чата ADMIN_BAN
// #define DEAD_ALLCHAT
// Мертвые слышат всех
// Работает, только если включен ALIVE_DEAD_CHAT
/*
End settings
*/
#if VOICE_BY_STATS > 0
new g_bitAllowVoice;
#if VOICE_BY_STATS == 1
native rd_get_user_level(index);
#endif
#if VOICE_BY_STATS == 2
native csstats_get_user_stats(index, stats[]);
#endif
#if VOICE_BY_STATS == 3
native aes_get_player_stats(index, data[]);
#endif
#if VOICE_BY_STATS == 4
native get_user_stats(index, stats[], bodyhits[]);
#endif
#endif
#if defined ALIVE_DEAD_CHAT
new g_bitAlive;
#else
#if defined DEAD_ALLCHAT
#undef DEAD_ALLCHAT
#endif
#endif
#if defined VOICE_IN_TEAM
new TeamName:g_iPlayerTeam[33];
#else
#if defined ADMIN_ALLCHAT
#undef ADMIN_ALLCHAT
#endif
#endif
#if defined ADMIN_ALLCHAT
forward client_admin(index, flags);
new g_bitAllChat;
#endif
#define get_bit(%1,%2) (%1 & (1 << (%2 & 31)))
#define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
#define clr_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
public plugin_init()
{
register_plugin("Voice Management", "1.0.4", "neugomon");
#if defined ALIVE_DEAD_CHAT
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn_Post", true);
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true);
#endif
#if defined VOICE_IN_TEAM
register_clcmd("joinclass", "CheckUserTeam");
register_clcmd("menuselect", "CheckUserTeam");
#endif
register_forward(FM_Voice_SetClientListening, "Voice_SetClientListening_Pre", false);
#if VOICE_BY_STATS > 0
RegisterHookChain(RG_RoundEnd, "RoundEnd_Post", true);
#endif
set_task(2.0, "Set_Alltalk");
}
public Set_Alltalk()
set_cvar_num("sv_alltalk", 1);
public client_putinserver(id)
{
#if defined ALIVE_DEAD_CHAT
clr_bit(g_bitAlive, id);
#endif
#if defined ADMIN_ALLCHAT || VOICE_BY_STATS > 0
new flags = get_user_flags(id);
#endif
#if VOICE_BY_STATS > 0
clr_bit(g_bitAllowVoice, id);
if(flags & ADMIN_ALLOW_VOICE)
set_bit(g_bitAllowVoice, id);
else set_task(1.5, "LoadPlayerStats", id);
#endif
#if defined VOICE_IN_TEAM
g_iPlayerTeam[id] = TEAM_UNASSIGNED;
#endif
#if defined ADMIN_ALLCHAT
if(flags & ADMIN_ALLCHAT)
set_bit(g_bitAllChat, id);
else clr_bit(g_bitAllChat, id);
#endif
}
#if defined ADMIN_ALLCHAT
public client_admin(id, flags)
{
#if VOICE_BY_STATS > 0
if(flags & ADMIN_ALLOW_VOICE)
set_bit(g_bitAllowVoice, id);
#endif
if(flags & ADMIN_ALLCHAT)
set_bit(g_bitAllChat, id);
else clr_bit(g_bitAllChat, id);
}
#endif
#if defined ALIVE_DEAD_CHAT
public CBasePlayer_Spawn_Post(const id)
{
if(is_user_alive(id))
set_bit(g_bitAlive, id);
else clr_bit(g_bitAlive, id);
}
public CBasePlayer_Killed_Post(const victim)
clr_bit(g_bitAlive, victim);
#endif
#if defined VOICE_IN_TEAM
public CheckUserTeam(id)
g_iPlayerTeam[id] = get_member(id, m_iTeam);
#endif
public Voice_SetClientListening_Pre(receiver, sender)
{
if(receiver == sender)
return FMRES_IGNORED;
#if VOICE_BY_STATS > 0
if(!get_bit(g_bitAllowVoice, sender))
{
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
#endif
#if defined ADMIN_ALLCHAT
if(get_bit(g_bitAllChat, receiver))
return FMRES_IGNORED;
#endif
#if defined VOICE_IN_TEAM
if(g_iPlayerTeam[sender] != g_iPlayerTeam[receiver])
{
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
#endif
#if defined DEAD_ALLCHAT
if(!get_bit(g_bitAlive, receiver))
return FMRES_IGNORED;
#endif
#if defined ALIVE_DEAD_CHAT
if(get_bit(g_bitAlive, sender) == get_bit(g_bitAlive, receiver))
return FMRES_IGNORED;
#endif
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
public RoundEnd_Post(WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay)
LoadPlayerStats(0);
public LoadPlayerStats(index)
{
new players[32], pnum = 1;
if(index)
{
if(!is_user_connected(index))
return;
else players[0] = index;
}
else get_players(players, pnum, "ch");
#if VOICE_BY_STATS > 0
new stats[22];
#if VOICE_BY_STATS == 4
new bh[8];
#endif
#endif
for(new i; i < pnum; i++)
{
#if VOICE_BY_STATS == 1
stats[0] = rd_get_user_level(players);
if(stats[0] >= MIN_LEVEL)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходим ^4%d ^1уровень, у Вас ^4%d^1.", MIN_LEVEL, stats[0]);
#endif
#if VOICE_BY_STATS == 2
if(csstats_get_user_stats(players, stats) > 0)
{
if(stats[0] >= MIN_FRAGS)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходимо ^4%d ^1фрагов, у Вас ^4%d^1.", MIN_FRAGS, stats[0]);
}
#endif
#if VOICE_BY_STATS == 3
if(aes_get_player_stats(players, stats))
{
if(stats[1] >= MIN_LEVEL)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходим ^4%d ^1уровень, у Вас ^4%d^1.", MIN_LEVEL, stats[0]);
}
#endif
#if VOICE_BY_STATS == 4
if(get_user_stats(players, stats, bh))
{
if(stats[0] >= MIN_FRAGS)
set_bit(g_bitAllowVoice, players);
else ChatColor(players, "^1[^4Voice Management^1] ^1Доступ в Voice чат ^4заблокирован^1! Для доступа необходимо ^4%d ^1фрагов, у Вас ^4%d^1.", MIN_FRAGS, stats[0]);
}
#endif
}
}
stock ChatColor(const id, szMessage[], any:...)
{
new szMsg[190];
vformat(szMsg, charsmax(szMsg), szMessage, 3);
message_begin(MSG_ONE, 76, .player = id);
write_byte(id);
write_string(szMsg);
message_end();
}
Последнее редактирование: