This plugin will show message when a player is killed in air , that is what u was asking for
PHP Code:
#include <amxmodx>
#include <csx>
#include <fakemeta>
#define PLUGIN "Air Kill"
#define VERSION "1.0"
#define AUTHOR "Krot@al / kWo"
#define FL_ONGROUND2 (FL_ONGROUND | FL_PARTIALGROUND | FL_INWATER | FL_CONVEYOR | FL_FLOAT)
new const g_AirKillMessages[][] = {
"%s was killed by %s^nwhile he was in the air",
"%s was killed by %s^nwhile he was flying like a pigeon"
}
new toggle_plugin
new g_iMaxPlayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
toggle_plugin = register_cvar("amx_airkill","1")
register_event("DeathMsg", "Event_DeathMsg", "a")
g_iMaxPlayers = get_maxplayers()
}
public Event_DeathMsg()
{
if( get_pcvar_num(toggle_plugin) )
{
new killer = read_data(1)
new victim = read_data(2)
if( killer != victim &&
1 <= killer <= g_iMaxPlayers &&
!(pev(victim, pev_flags) & FL_ONGROUND2) )
{
static killer_name[32], victim_name[32]
get_user_name(killer, killer_name, 31)
get_user_name(victim, victim_name, 31)
client_print(0, print_chat, g_AirKillMessages[random(sizeof(g_AirKillMessages))], victim_name, killer_name)
}
}
}