May i suggest this instead of your Health decreasing solution.. it would also work for temporary health and score the Pounce correctly for the Jockey.
PHP Code:
// timer idea by dirtyminuth, damage dealing by pimpinjuice http://forums.alliedmods.net/showthread.php?t=111684
// added some L4D2 specific checks
static applyDamage(damage, victim, attacker)
{
new Handle:dataPack = CreateDataPack();
WritePackCell(dataPack, damage);
WritePackCell(dataPack, victim);
WritePackCell(dataPack, attacker);
CreateTimer(0.10, timer_stock_applyDamage, dataPack);
}
public Action:timer_stock_applyDamage(Handle:timer, Handle:dataPack)
{
ResetPack(dataPack);
new damage = ReadPackCell(dataPack);
new victim = ReadPackCell(dataPack);
new attacker = ReadPackCell(dataPack);
CloseHandle(dataPack);
decl Float:victimPos[3], String:strDamage[16], String:strDamageTarget[16];
GetClientEyePosition(victim, victimPos);
IntToString(damage, strDamage, sizeof(strDamage));
Format(strDamageTarget, sizeof(strDamageTarget), "hurtme%d", victim);
new entPointHurt = CreateEntityByName("point_hurt");
if(!entPointHurt) return;
// Config, create point_hurt
DispatchKeyValue(victim, "targetname", strDamageTarget);
DispatchKeyValue(entPointHurt, "DamageTarget", strDamageTarget);
DispatchKeyValue(entPointHurt, "Damage", strDamage);
DispatchKeyValue(entPointHurt, "DamageType", "0"); // DMG_GENERIC
DispatchSpawn(entPointHurt);
// Teleport, activate point_hurt
TeleportEntity(entPointHurt, victimPos, NULL_VECTOR, NULL_VECTOR);
AcceptEntityInput(entPointHurt, "Hurt", (attacker && attacker < 32 && IsClientInGame(attacker)) ? attacker : -1);
// Config, delete point_hurt
DispatchKeyValue(entPointHurt, "classname", "point_hurt");
DispatchKeyValue(victim, "targetname", "null");
RemoveEdict(entPointHurt);
}