Well guys the problem is that what happens is that when I kill a zombie this gives me a point but if I keep shooting the zombie that still gives me point ... until it falls down and gets quiet
Someone fix the code to make it work well?
Sorry bad english...
C++ Source Code:
1
void CZombie :: Killed( entvars_t *pevAttacker, int iGib )
2
{
3
ClientPrint( pevAttacker, HUD_PRINTCENTER, "Killed zombie, you win 1 point!" );
4
5
CBaseEntity * ep = CBaseEntity:: Instance (pevAttacker);
MisterDeath well, try to move your "Point giving" code into another function in CZombie class... HandleAnimEvent maybe? Add new event for "die" animations in zombie's model at frame 1, for example and call your code from HandleAnimEvent. But you'll need to get a killer's edict somehow from that function...