Since you're posting in the AMX Mod X section, I'm not sure what most of these things mean (because it's SourceMod) but it can be made much more efficient and maintainable:
PHP Code:
public Action TF2_OnTakeHealthGetMultiplier(int client, float &flMultiplier)
{
if( TF2_GetPlayerClass(client) != TFClass_Soldier )
{
int hMelee = GetPlayerWeaponSlot(client, TFWeaponSlot_Melee);
int ItemIndex = TF2_GetItemDefinitionIndexSafe(hMelee);
switch( ItemIndex )
{
case: 6 ,196 ,264 ,474 ,880 ,939 ,954 ,1013 ,1123 ,1127
{
// Do nothing
}
default:
{
// ItemIndex isn't one of the values above
return Plugin_Continue;
}
}
}
Maybe this will help you solve your issues, being able to look at it different can sometimes help. Note that I don't do any SourceMod programming so I don't know if the syntax above is actually correct.
__________________