sLog.outString("Kick Block");
if(!delay)
{
sLog.outString("Kick Block IF !DELAY");
return;
}
else
{
sLog.outString("Kick Block ELSE DELAY");
ChatHandler(this).GreenSystemMessageToPlr(this,"Yo u will be removed from the server in 6 seconds.");
for (int A = 0; A < 1000000000; ++A);
ChatHandler(this).GreenSystemMessageToPlr(this,"Yo u have 5 seconds left.");
for (int B = 0; B < 1000000000; ++:cool:;
ChatHandler(this).GreenSystemMessageToPlr(this,"4 seconds left what are you going to do?");
for (int C = 0; C < 1000000000; ++C);
ChatHandler(this).GreenSystemMessageToPlr(this,"3 seconds. Try not to be so silly next time.");
for (int D = 0; D < 1000000000; ++D);
ChatHandler(this).GreenSystemMessageToPlr(this,"2 seconds left I hope you will try a little better next time.");
for (int E = 0; E < 1000000000; ++E);
ChatHandler(this).GreenSystemMessageToPlr(this,"Yo u have 1 seconds.");
for (int F = 0; F < 1000000000; ++F);
ChatHandler(this).GreenSystemMessageToPlr(this,"Go od Bye.");
GetSession()->KickPlayer();
}
THis is _horrible_ .
If you try to understand it a bit, there are 6 loops that each count from 0 to 1000000000. (and the time for the processor to do it is wrongly estimated to 1s by the maker of this code)
So :
1) This gonna make the CPU 100% and freeze the server
2) who said 1000000000 loops made one second? This isn't accurate at all
You absolutly need to find another method.