Thread: Air Kill
View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-28-2008 , 09:29   Re: Air Kill
Reply With Quote #12

This should be more accurate :

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(PLUGINVERSIONAUTHOR)
    
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             && 
            
<= killer <= g_iMaxPlayers    && 
            !(
pev(victimpev_flags) & FL_ONGROUND2) )
        {
            static 
killer_name[32], victim_name[32]
            
get_user_name(killerkiller_name31)
            
get_user_name(victimvictim_name31)
            
client_print(0print_chatg_AirKillMessages[random(sizeof(g_AirKillMessages))], victim_namekiller_name)
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline