Okay, so I have this code and I want to add more stuff!
Check if the player killed the enemy trough a wall, is it possible?
PHP Code:
#include <amxmodx>
#include <fun>
#include <dhudmessage>
new nKiller
public plugin_init()
{
register_event("DeathMsg", "hook_death", "a", "1>0")
}
public hook_death()
{
nKiller = read_data(1)
// CHECK WALL?
// DO STUFF...
if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
screenFade()
set_dhudmessage(100, 100, 0, -1.0, 0.15, 1, 1.0, 1.0, 0.1, 0.1)
show_dhudmessage(nKiller, "HEADSHOT")
}
else
screenFade()
}
public screenFade()
{
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(255)
write_byte(0)
write_byte(0)
write_byte(100)
message_end()
}