Quote:
Originally Posted by Compidence
You need to reword your question. What do you need help with exactly?
PHP Code:
// Get victim armor
static Float:armor
pev(Victim, pev_armorvalue, armor)
// If he has some, block the infection and reduce armor instead
if (armor > 0.0)
{
if (armor - damage > 0.0)
set_pev(victim, pev_armorvalue, armor - damage)
else
cs_set_user_armor(victim, 0, CS_ARMOR_NONE)
return HAM_SUPERCEDE;
}
// Set Zombie
set_user_zombie(Victim, Attacker, 0, 0)
Is that part not working? It looks fine to me.
|
there's one issue, the fact that the first time the player is hit and his armor drops below 0 he doesn't become a zombie until the next hit
also, I don't recall cs_set_user_armor using float