Quote:
Originally Posted by HamletEagle
If you registered DeathMsg(the death event) then you already detected a kill. The event will be called when a player is killed.
Then get the attacker,(read_data(1) IIRC), team = get_user_team(attacker), globalVariable[team]++.
|
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new TKills
new CTKills
public plugin_init()
{
register_plugin("hud", "", "rinf")
register_event("DeathMsg", "Event_DeathMsg", "a", "1")
hudmessage()
}
public Event_DeathMsg()
{
new attacker = read_data(1)
new Team = get_user_team(attacker)
if(Team == 1)
{
TKills++;
}
else if(Team == 2)
{
CTKills++
}
}
public hudmessage()
{
set_dhudmessage(0, 255, 0, -1.0, 0.0, 0, 6.0, 12.0)
show_dhudmessage(0, "〕Point〔^n〔%i〕 〔%i〕", TKills, CTKills);
}
correct me please thank you.