PDA

View Full Version : Client death with Hamsandwich


Dr.G
02-10-2009, 01:18 PM
This is the way to register a client/player death using Hamsandwich:

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Ham client death"
#define VERSION "1.0"
#define AUTHOR "Dr.G"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam(Ham_Killed, "player", "Player_Killed",1)
/* *1 *2 *3

*1 - Register an entity is killed = Ham_Killed
*2 - Entity named: player
*3 - Function to forward to: Player_Killed */
}

public Player_Killed(id, idAttacker, shouldgib)
{
new name[33]
get_user_name(id, name, 32)

client_print(id,print_center,"You died %s",name)

return HAM_IGNORED
}