Kod:
#include <amxmodx>
#include <reapi>
new const PLUGIN[] = "Give_TL_For_Damage";
new const VERSION[] = "1.0";
new const AUTHOR[] = "By.KinG";
native jb_get_user_jbpacks(ID);
native jb_set_user_jbpacks(ID, Ammount);
new const TAG[] = "WebAilesi GaminG";
new Float: Toplam_Hasar[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage", .post = true);
RegisterHookChain(RG_CBasePlayer_Spawn, "CBasePlayer_Spawn", .post = true);
}
public CBasePlayer_TakeDamage(Victim, Inflictor, Attacker, Float: Damage, Damage_Bits)
{
if(is_user_connected(Victim) && is_user_connected(Attacker) && Victim != Attacker)
{
if(Toplam_Hasar[Attacker] >= 50.0)
{
jb_set_user_jbpacks(Attacker, jb_get_user_jbpacks(Attacker) + 2);
client_print_color(Attacker, Attacker, "^1[^3%s^1] ^4Toplam^3 50 ^4Hasar Verdigin Icin^3 2 TL ^4Kazandin", TAG);
}
else Toplam_Hasar[Attacker] += Damage;
}
}
public CBasePlayer_Spawn(ID) Toplam_Hasar[ID] = 0.0;
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/)


