Kick wrong player
Posted: May 29th, 2010, 6:20 pm
This script kicks the wrong player. It kicks someone that connects to the server.
So if someone has 1 = true and his time = 60 or bigger then the player that connects gets kicked. Instead of the player that has time = 60 or bigger.
custom_public.gcs
player.gcs
So if someone has 1 = true and his time = 60 or bigger then the player that connects gets kicked. Instead of the player that has time = 60 or bigger.
custom_public.gcs
Code: Select all
onNewConnection()
{
self endon( "disconnect" );
for(;;)
{
level waittill("connected", player);
player thread promod_ruleset\player::setkick();
}
}
Code: Select all
setkick()
{
for(;;)
{
wait 10;
if( 1 == "true" )
{
self.time+=10;
if(self.time == 40)
{
self IPrintLnBold("You are getting ^1kicked ^7in 20 seconds");
}
else if(self.time >= 60)
{
IPrintLn("^1" + self.name + " ^7is kicked");
Kick(self.clientid);
}
}
else if( 1 != "true" )
{
self.time = 0;
}
}
}