mirror of
https://github.com/diamante0018/InfectedGSC.git
synced 2025-04-22 13:25:44 +00:00
53 lines
787 B
C
53 lines
787 B
C
/*
|
|
_inf_anti_rage_quit
|
|
Author: FutureRave
|
|
Date: 29/09/2021
|
|
*/
|
|
|
|
#include common_scripts\utility;
|
|
#include maps\mp\_utility;
|
|
|
|
init()
|
|
{
|
|
thread antiRageQuit();
|
|
thread onPlayerConnect();
|
|
}
|
|
|
|
antiRageQuit()
|
|
{
|
|
level endon( "game_ended" );
|
|
gameFlagWait( "prematch_done" );
|
|
|
|
for ( ;; )
|
|
{
|
|
wait( .5 );
|
|
|
|
if ( level.players.size < 3 ) continue; // If it's only 2 people let them quit
|
|
|
|
foreach ( player in level.players )
|
|
{
|
|
if ( player.pers["team"] == "axis" )
|
|
{
|
|
player closepopupmenu( "" );
|
|
player closeingamemenu();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
onPlayerConnect()
|
|
{
|
|
for ( ;; )
|
|
{
|
|
level waittill( "connected", player );
|
|
player thread onPlayerDisconnect();
|
|
}
|
|
}
|
|
|
|
onPlayerDisconnect()
|
|
{
|
|
self waittill( "disconnect" );
|
|
text = self.name + " ^1Left the server";
|
|
iPrintLn( text );
|
|
}
|