#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_plugin("fejloves+300","1.0","Eg@r4$il{")
register_event("Damage","event_damage","b","2!0"); // damage event
register_cvar("amx_headshotmoney","300")
}
public event_damage(id)
{
if(get_user_health(id)>0)return PLUGIN_CONTINUE
new weapon,bodypart,attacker = get_user_attacker(id, weapon, bodypart)
if(get_user_health(id)<=0 && bodypart==1 && get_user_team(id)!=get_user_team(attacker))
{
ShowHud(attacker)
fm_set_user_money(attacker,fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney")>16000?16000:fm_get_user_money(attacker)+get_cvar_num("amx_headshotmoney"))
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
stock fm_get_user_money(index)
{
return get_pdata_int(index,115)
}
stock fm_set_user_money(index, money, flash = 1)
{
set_pdata_int(index, 115, money);
message_begin(MSG_ONE, get_user_msgid("Money"), _, index);
write_long(money);
write_byte(flash ? 1 : 0);
message_end();
}
public ShowHud(id)
{
set_hudmessage(255, 20, 147,0.87,0.83,1,3.0,3.0,0.1,0.2,2)
show_hudmessage(id, "+%i$ A fejl:ov'es'ert!",get_cvar_num("amx_headshotmoney")>16000?16000:get_cvar_num("amx_headshotmoney"))
return PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/