waitTillSomePlayerDied()
{
level.playerKilledNotification = "playerKilled";
foreach(player in level.players)
{
player thread waitForDeath();
}
level waittill(level.playerKilledNotification);
}
waitForDeath()
{
level endon("game_ended");
level endon(level.playerKilledNotification);
self waittill("killed_player");
level notify(level.playerKilledNotification);
}
// Waits till you killed another player but fails when kills on the scoreboard don't update
waitTillPlayerKilled()
{
self endon("disconnect");
oldKillsCount = self.pers["kills"];
while(true)
{
updatedKillsCount = self.pers["kills"];
if(updatedKillsCount > oldKillsCount)
{
return;
}
wait 0.05;
}
}
waitTillSomePlayerDied()
{
level.playerKilledNotification = "playerKilled";
foreach(player in level.players)
{
player thread waitForDeath();
}
level waittill(level.playerKilledNotification);
}
waitForDeath()
{
level endon("game_ended");
level endon(level.playerKilledNotification);
self waittill("killed_player");
level notify(level.playerKilledNotification);
}
// Waits till you killed another player but fails when kills on the scoreboard don't update
waitTillPlayerKilled()
{
self endon("disconnect");
oldKillsCount = self.pers["kills"];
while(true)
{
updatedKillsCount = self.pers["kills"];
if(updatedKillsCount > oldKillsCount)
{
return;
}
wait 0.05;
}
}
killDetection()
{
self endon("disconnect");
self endon("game_ended");
self endon("end_killDetection");
self.killDetection = self.pers["kills"];
for(;
{
if(self.killDetection != self.pers["kills"])
{
//activate scripts
self.killDetection = self.pers["kills"]
}
wait 0.01;
}
}
ondeath()
{
self endon("done");
for(;
{
self waittill("death");
//do shit
wait 0.10;
self notify("done");
}
}
ondeath()
{
self endon("done");
for(;
{
self waittill("death");
//do shit
wait 0.10;
self notify("done");
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.