#include <amxmodx>
#define FLAG_ACCESS ADMIN_LEVEL_H /* Админ, Вип не слепит сам себя. */
#if defined FLAG_ACCESS
#define is_admin_vip(%1) (get_user_flags(%1) & FLAG_ACCESS)
#endif
new g_iFlasher, g_iFlasherTeam
public plugin_init()
{
register_plugin("No Team Flash", "0.04", "neugomon")
register_message(get_user_msgid("SendAudio"), "mSendAudio")
register_message(get_user_msgid("ScreenFade"), "mScreenFade")
register_event("HLTV", "EventStartRound", "a", "1=0", "2=0")
}
public EventStartRound()
g_iFlasher = g_iFlasherTeam = 0
public mSendAudio(msgId, msgDest, msgEnt)
{
#pragma unused msgId
#pragma unused msgDest
#pragma unused msgEnt
static text[19], id
get_msg_arg_string(2, text, charsmax(text))
if (text[7] == 'F' && text[11] == 'I' && text[13] == 'H')
{
g_iFlasher = (id = get_msg_arg_int(1))
g_iFlasherTeam = get_user_team(id)
}
}
public mScreenFade(msgId, msgDest, msgEnt)
{
#pragma unused msgId
#pragma unused msgDest
#pragma unused msgEnt
static id; id = msgEnt
if (id != g_iFlasher && g_iFlasherTeam == get_user_team(g_iFlasher))
return PLUGIN_HANDLED
#if defined FLAG_ACCESS
if (is_admin_vip(g_iFlasher))
return PLUGIN_HANDLED
#endif
return PLUGIN_CONTINUE
}