// Copyright © 2015 Vaqtincha
//====================== CONFIG START =======================//
// ======================= CONFIG END ========================//
new g_FlId, g_MsgIdSayText
register_plugin("Flasher Name", "1.0.0", "Vaqtincha")
RegisterHam(Ham_Think, "grenade", "Grenade_Think", .Post = false)
g_MsgIdSayText = get_user_msgid("SayText")
register_message(get_user_msgid("ScreenFade"), "Message_ScreenFade")
register_event("ScreenFade", "Event_ScreenFade", "be","1>0","2>0","3=0","4=255","5=255","6=255","7>199")
public Message_ScreenFade(iMsgId, iMsgType, iMsgEnt)
if(get_msg_arg_int(ColorR) != 255 || get_msg_arg_int(ColorG) != 255
|| get_msg_arg_int(ColorB) != 255 || get_msg_arg_int(Alpha) < 200)
if(!g_FlId || iMsgEnt == g_FlId || get_user_team(iMsgEnt) != get_user_team(g_FlId))
public Event_ScreenFade(id)
if(!g_FlId || id == g_FlId || get_user_team(id) != get_user_team(g_FlId))
new szNoobName[32], szVictimName[32]
get_user_name(g_FlId, szNoobName, charsmax(szNoobName))
get_user_name(id, szVictimName, charsmax(szVictimName))
client_print_color(id, print_team_grey, "^3Вас ослепил товарищ по команде ^1(^4%s^1)", szNoobName)
client_print_color(g_FlId, print_team_red, "^3Вы ослепили товарища по команде ^1(^4%s^1)", szVictimName)
ChatPrintColor(id, "^4[SERVER] ^1Вас ослепил товарищ по команде (^3%s^1)", szNoobName)
ChatPrintColor(g_FlId, "^4[SERVER] ^3Вы ^1ослепили товарища по команде (^3%s^1)", szVictimName)
public Grenade_Think(ent)
static szModel[23]; pev(ent, pev_model, szModel, charsmax(szModel))
if(equal(szModel, "models/w_flashbang.mdl"))
if(pev(ent, pev_dmgtime) <= get_gametime() && ~pev(ent, pev_effects) & EF_NODRAW)
g_FlId = pev(ent, pev_owner)
stock ChatPrintColor(id, const szMessage[], any:...)
static szMsg[191]; vformat(szMsg, charsmax(szMsg), szMessage, 3)
if(is_user_connected(id))
message_begin(MSG_ONE, g_MsgIdSayText, .player = id)