03-23-2011, 18:56
Hey,
ive got a Problem with my Mod. I wanna incluede custom Killstreaks. So here is the Function, which counts the Kills after Death:
But this Function is very buggy. The game laggs and when someone dies the game will freeze for some secs...
Anybody can help?
ive got a Problem with my Mod. I wanna incluede custom Killstreaks. So here is the Function, which counts the Kills after Death:
PHP Code:
KillCounter()
{
self endon("disconnect");
self endon("death");
wait 0.1;
self.StartKills = self.pers["kills"];
self.Killstreak = 0;
self thread setKillsToZero();
for(;;)
{
if(self.Killstreak != self.pers["kills"] - self.StartKills)
{self.Killstreak = self.pers["kills"] - self.StartKills;}
wait 0.1;
}
}
setKillsToZero()
{
self endon("disconnect");
for(;;)
{
self waittill("death");
self.StartKills = self.pers["kills"];
self.Killstreak = 0;
}
}
But this Function is very buggy. The game laggs and when someone dies the game will freeze for some secs...
Anybody can help?