11-20-2011, 20:06
Hey guys,
I have problem, this code sometimes crashes server, why?
I have problem, this code sometimes crashes server, why?
Code:
wrathZombies(time)
{
self.canUseSpecial = false;
iprintlnbold("^4Wrath of Zod called by:^7 " + self.name );
self thread wrathEnd(time);
visionSetnaked("zom_woz");
self endon("end_wrath");
for(;;)
{
choosenPlayer = level.alivePlayers["axis"][randomint(level.alivePlayers["axis"].size)];
spawnPoint = choosenPlayer.origin;
wait .1;
if(choosenPlayer.team == "axis" && choosenPlayer zom\mp\_zom_class::isReallyAlive() && choosenPlayer != self)
{
playFx( level._effect["zom_elec"], choosenPlayer.origin + (0,0,200));
playFx( level._effect["zom_plux"], choosenPlayer.origin + (0,0,200));
if(choosenPlayer.health >= 3) // anti - bug
{
self radiusDamage(spawnPoint, 50, 50, 50, self);
wait .1;
}
choosenPlayer iprintLnBold("^4You are wrathed by ^7" + self.name);
wait .1;
iprintLn(choosenPlayer.name + " ^4is wrathed by ^7" + self.name );
wait 2.5;
}
wait 1;
}
wait 1;
}