PHP Code:
stock bool:IsCommonInfected(iEntity)
{
if (iEntity && IsValidEntity(iEntity)
{
decl String:strClassName[64];
GetEdictClassName(iEntity, strClassName, sizeof(strClassName));
return StrEqual(strClassName, "infected");
}
return false;
}
stock GetEntityLifeState(iEntity)
{
return GetEntProp(iEntity, Prop_Data, "m_lifeState");
}
The first one should let you know if an entity is a common infected. The second should return the entity's life state, wich should tell you if it's alive or not. I don't know the exact values it should have, you'll have to find out that by yourself.
__________________