#include <amxmodx>
#include <reapi>
new const iTag[] = "Webailesi";
new const g_szSound[] = "firstblood.wav";
new bool:blFirstBlood, cvar;
public plugin_init()
{
register_plugin("First Blood Money", "0.1", "LyNcH");
RegisterHookChain(RG_CBasePlayer_Killed, "@PlayerKilled", .post = true);
RegisterHookChain(RG_CSGameRules_RestartRound, "@RestartRound", .post = false);
bind_pcvar_num(create_cvar("firstkill_money", "1000"), cvar);
}
public plugin_precache()
{
precache_sound(g_szSound);
}
@PlayerKilled(const this, pevAttacker)
{
if(this == pevAttacker || !is_user_connected(pevAttacker))
{
return;
}
if(!blFirstBlood)
{
blFirstBlood = true;
rg_add_account(pevAttacker, get_member(pevAttacker, m_iAccount) + cvar, AS_SET);
rg_send_audio(0, g_szSound);
client_print_color(0,0, "^1[^3%s^1] ^3%n ^4Adli Oyuncu Ilk Kill'i Alarak ^3%d $ Kazandi.", iTag, pevAttacker, cvar);
}
}
@RestartRound()
{
blFirstBlood = false;
}