Try this:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
new g_iMaxPlayers;
public plugin_init()
{
register_plugin("Double Knife Damage", "1.0", "AMXX Community")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage");
g_iMaxPlayers = get_maxplayers();
}
public Player_TakeDamage(id, inflictor, attacker, Float:damage, damagebits)
{
if( !(1 <= attacker <= g_iMaxPlayers)
|| attacker != inflictor
|| cs_get_user_team(attacker) != CS_TEAM_CT
|| get_user_weapon(attacker) != CSW_KNIFE )
return HAM_IGNORED;
SetHamParamFloat(4, damage * 2); //Here knife does double damage, ofc you can set it to 0.0 or anything.
return HAM_HANDLED;
}
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.