Hello,
I have really silly question but I just could not find the answer anywhere..
I'm working on the system that will kick non-active players if more than 12 people are connected. I'm currently at this stage:
This works but it does not work for spectators, only for players on track.
I even tried to use
but this does not seem to work.
Is it even possible with Lapper?
Thanks, Lakyn
I have really silly question but I just could not find the answer anywhere..
I'm working on the system that will kick non-active players if more than 12 people are connected. I'm currently at this stage:
CatchEvent OnIdle1( $userName ) # Player CatchEvent
$OnIdleTimeout1 = 10; # Idle timeout for OnIdleAction1 in seconds
$numConns = GetLapperVar("numconns");
IF ( $numConns > 12 )
THEN
privMsg("You are idle and will be kicked soon!");
ENDIF
EndCatchEvent
CatchEvent OnIdle2( $userName ) # Player CatchEvent
$OnIdleTimeout2 = 20; # Idle timeout for OnIdleAction2 in seconds
$numConns = GetLapperVar("numconns");
IF ( $numConns > 12 )
THEN
GlobalMsg( GetCurrentPlayerVar("UserName") . " ^1WAS KICKED FOR NON-ACTIVITY!");
cmdLFS("/kick " . GetCurrentPlayerVar("UserName") );
ENDIF
EndCatchEvent
This works but it does not work for spectators, only for players on track.
I even tried to use
IF(GetCurrentPlayerVar( "OnTrack" ) == 0)
but this does not seem to work.
Is it even possible with Lapper?
Thanks, Lakyn