Post: (Zombies) Kill Player isn't working??
05-08-2016, 09:39 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So, I was making a kill player function for my zombie menu and it seems not to work?
Can anybody help me?

    
killplayer(player)
{
if (!player isHost() || self.name == player.name)
{
self iPrintln(player.name + " killed!");
player.maxhealth=0;
player suicide();
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
05-08-2016, 11:42 PM #2
anthonything
Space Ninja
Zombies uses an override to suicide. Here:

self notify("player_suicide");
self maps/mp/zombies/_zm_laststand::bleed_out();
05-09-2016, 12:25 AM #3
Originally posted by anthonything View Post
Zombies uses an override to suicide. Here:

self notify("player_suicide");
self maps/mp/zombies/_zm_laststand::bleed_out();


Ok, thank you for the information!
05-09-2016, 02:28 AM #4
ODLeslie
Do a barrel roll!
If you're still having problems copy and paste this in with your other functions:
    

killplayer(player)
{
if(player isHost()) //Protection from other players trying to kill the host
self iPrintln("You cannot kill the ^1Host");
else
{
self iPrintln(player.name+" ^2Killed");
player Suicide();
}
}

Suicide()
{
self.maxhealth = 100;
self.health = self.maxhealth;
self disableInvulnerability();
direction = (randomfloatrange(-20, 20), randomfloatrange(-20, 20), randomfloatrange(-20, 20));
self dodamage(self.health * 2, self.origin + direction);
self.bleedout_time = 0;
}

// Call the function as: "::killplayer, player);"

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo