Code:
public plugin_init()
{
register_plugin("Message Demo", "1.0", "BAILOPAN")
//this message informs everyone of a death, so we use
// flag "a" - global event
register_event("DeathMsg", "hook_death", "a")
}
public hook_death()
{
new Killer = read_data(1) //get the first message parameter
new Victim = read_data(2) //get the second message parameter
new headshot = read_data(3) //was this a headshot?
new weapon[32]
read_data(4, weapon, 31) //get the weapon name
}
source:
AMXX WIKI