Quote:
Originally Posted by reinert
Hook death event, and check if victim is CS_TEAM_T Then add tkills+=1, if CT then add ctkills+=1. Save everything like frags are saved. just edit statsx.sma
|
I believe this is what you mean:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "Detect Kills"
#define AUTHOR "Shadow"
#define VERSION "1.0"
new tkills[33], ctkills[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Killed, "player", "eDeath", 1 )
}
public eDeath( id )
{
new iAttacker = read_data( 1 )
new iVictim = read_data( 2 )
if( iVictim == iAttacker )
return PLUGIN_HANDLED
if( cs_get_user_team( iVictim ) == CS_TEAM_T )
{
tkills[id]+= 1
} else {
ctkills[id]+= 1
}
return PLUGIN_HANDLED;
}
__________________