addTestClients()
{
wait 5;
for(;
{
if(getdvarInt("scr_testclients") > 0)
break;
wait 1;
}
// for ( index = 1; index < 24; index++ )
// kick( index );
testclients = getdvarInt("scr_testclients");
SetDevDvar( "scr_testclients", 0 );
for(i = 0; i < testclients; i++)
{
ent[i] = addtestclient();
if (!isdefined(ent[i])) {
println("Could not add test client");
wait 1;
continue;
}
ent[i].pers["isBot"] = true;
ent[i] TestClient( "autoassign" );
}
if ( matchMakingGame() )
setMatchData( "hasBots", true );
// default to not moving or firing
//SetDevDvar( "testClients_doMove", false );
//SetDevDvar( "testClients_doAttack", false );
thread addTestClients();
}
TestClient(team)
{
self endon( "disconnect" );
while(!isdefined(self.pers["team"]))
wait( 0.05 );
if ( allowTeamChoice() )
{
self notify("menuresponse", game["menu_team"], team);
wait( 0.5 );
}
if ( allowClassChoice() )
{
class = "class" + randomInt( 5 );
self notify("menuresponse", "changeclass", class);
}
self waittill_notify_or_timeout( "spawned_player", 0.5 );
wait( 0.10 );
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.