Code:
#include <amxmodx> // used to be "amxmod", that's an old AMX include
#include <engine> // used to be "Vexd_Utilities", that's an old AMX include
#include <fun> // used to be "Fun", I believe includes are case-sensitive?
public plugin_init()
{
register_plugin("Scout Damage", "99.9", "Blah")
register_event("Damage", "scout_damage", "b", "2!0")
}
public scout_damage(id) // used to be "damage", but that's not how you registered it
{
if (!is_user_alive(id)) return
new damage = read_data(2)
new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)
new headshot = bodypart == 1 ? 1 : 0
if ( weapon == CSW_SCOUT ) { // removed is_user_alive check, you already did one
// got rid of extraDamage calculation
ExtraDamage( id, attacker, float(damage), "weapon_scout", headshot ) // don't check for 0 damage, it's done in your register_event
}
}
stock ExtraDamage(victim,attacker,Float:damage,weapon[],headshot)
{
new Float:health = entity_get_float(victim,EV_FL_health);
if(health <= 0.0) return;
if(health - damage <= 0.0)
{
user_silentkill(victim);
make_deathmsg(attacker,victim,headshot,weapon);
set_user_frags(attacker,get_user_frags(attacker)+1);
}
else fakedamage(victim,weapon,damage,DMG_BULLET);
}
This should convert it to AMXX and get it to work. I changed your extraDamage part, because (damage * 2) - damage is the same as damage * 1, so I assume you just want double damage. I also added an ExtraDamage function, because AMXX doesn't have one by default.