What I'm doing wrong? If the enemy kills me trough a wall, the message displays "not visible", but if is visible the message stills the same.
PHP Code:
public hook_death()
{
if(!is_visible(nKiller, read_data(2)))
{
client_print(0,print_chat,"not visible")
}
if(is_visible(nKiller, read_data(2)))
{
client_print(0,print_chat,"visible")
}
if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
screenFade()
set_dhudmessage(R, G, B, -1.0, 0.15, 1, 1.0, 1.0, 0.1, 0.1)
show_dhudmessage(nKiller, "headshot")
}
else
screenFade()
}