Setting health for specific spawn classes?

Started by Kewun, Jul 15, 2016, 06:17 AM

Previous topic - Next topic

Kewun

How can i set a specific health for specifed classes? im doing a server humans vs zombies, and i want zombies to have 250 health, and humans only 125. How can i do this?

EK.IceFlake

How do you discriminate between players and zombies?
function onPlayerSpawn(player)
{
    if (player.Skin == ZOMBIE_SKIN) player.Health = 250;
    else player.Health = 125;
}
Replace the ZOMBIE_SKIN with zombies skin id