Quote:
Originally Posted by asd13
Its not reading or displaying right the message.
Problem is that if player kills he/she sees always the same message "You killed '%s' with HeadShot" no matter is it hs or not.
|
PHP Code:
#include < amxmodx >
public plugin_init( ) {
register_event("DeathMsg", "eDeath", "a");
}
public eDeath() {
new iKillerID = read_data(1);
new iVictimID = read_data(2);
new isHeadshot = read_data(3);
new Name[32];
get_user_name(iVictimID, Name, charsmax(Name));
if(isHeadshot) {
client_print(iKiller, client_print, "You killed %s with a headshot!", Name);
}
else {
client_print(iKiller, client_print, "You killed %s!", Name);
}
}
note:
isHeadshot is a bool.
I know it's the same thing wrecked said, but I think that this way it's more user-friendly (if it would be in any way xD)
__________________