It should automaticly detect if attacker has ADMIN_RCON flag and multiply his damage.
I assum you have required modules enabled in modules.ini and you have added your plugin to plugins.ini?
Try this (ang give log to see thats wrong):
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "Damage multiplier"
#define VERSION "1.0"
#define AUTHOR "jsaissac"
new cvar_dmgmultiplier
new g_iMaxPlayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
cvar_dmgmultiplier = register_cvar("amx_dmg_multiplier", "5")
g_iMaxPlayers = get_maxplayers()
}
public fw_TakeDamage(id, inflictor, attacker, Float:damage, damage_type)
{
if(attacker != id && 1 <= attacker <= g_iMaxPlayers && (get_user_flags(attacker) & ADMIN_RCON) && cs_get_user_team(id) == cs_get_user_team(attacker) )
{
new Float:newDmg = damage * get_pcvar_float(cvar_dmgmultiplier);
SetHamParamFloat(4, newDmg)
log_amx("[DMG_MULTIPLIER] Old Dmg=%f, New Dmg=%f", damage, newDmg);
} else {
log_amx("[DMG_MULTIPLIER] id:%d, attacker:%d, g_iMaxPlayers:%d, ADMIN_RCON:%d", id, attacker, g_iMaxPlayers, get_user_flags(attacker) & ADMIN_RCON);
}
return HAM_IGNORED;
}