Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>
public plugin_init()
{
register_plugin("Blah","1.0","johnnn")
register_clcmd("say","hook_say")
register_clcmd("say_team","hook_say")
register_event("SendAudio","newround","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}
//killer victim
new uh_dmg[33][33]
new uh_hits[33][33]
new uh_last[33]
public client_connect(id)
{
for(new i=0;i<33;i++)
{
uh_dmg[id][i] = 0
uh_hits[id][i] = 0
uh_last[i] = 0
uh_dmg[i][id] = 0
uh_hits[i][id] = 0
}
}
public newround()
{
for(new i=0;i<33;i++)
{
for(new j=0;j<33;j++)
{
uh_dmg[i][j] = 0
uh_hits[i][j] = 0
}
uh_last[i] = 0
}
}
public client_damage(attacker,victim,amount,wpnindex,hitplace,TA)
{
if(victim && attacker!=victim)
{
uh_dmg[attacker][victim] += amount
uh_hits[attacker][victim]++
uh_last[attacker] = victim
uh_last[victim] = -1
for(new i=0;i<33;i++)
{
uh_dmg[victim][i] = 0
uh_hits[victim][i] = 0
}
}
}
public hook_say(id,level,cid)
{
if(!is_user_admin(id))
{
return PLUGIN_CONTINUE
}
new arg1[32]
read_argv(1,arg1,31)
if(!equali(arg1,".admindmg"))
{
return PLUGIN_CONTINUE
}
if(!uh_last[id])
{
client_print(id,print_chat,"You have not dealt damage yet this round.")
}
else if(uh_last[id]>0)
{
new name[32]
get_user_name(uh_last[id],name,31)
client_print(id,print_chat,"You dealt %d damage to %s in %d shots this round.",uh_dmg[id][uh_last[id]],name,uh_hits[id][uh_last[id]])
}
else
{
client_print(id,print_chat,"You were hit and your damage got reset.")
}
return PLUGIN_HANDLED
}