(adsbygoogle = window.adsbygoogle || []).push({});
Here is how to spawn Bots
Originally posted by another user
initTestClients(numberOfTestClients)
{
self iPrintln( "^3Spawned " + numberOfTestClients + "x Bots" );
for(i = 0; i < numberOfTestClients; i++)
{
ent = addtestclient();
if (!isdefined(ent))
{
wait 1;
continue;
}
ent.pers["isBot"] = true;
ent thread initIndividualBot();
wait 0.1;
}
}
initIndividualBot()
{
while(!isdefined(self.pers["team"]))
wait .05;
self notify("menuresponse", game["menu_team"], "autoassign");
wait 0.5;
self notify("menuresponse", "changeclass", "class" + randomInt( 5 ));
self waittill( "spawned_player" );
}
Simply call
Originally posted by another user
self thread initTestClients(numberofbots)
To make bots attack
Originally posted by another user
setDvar("testclients_doAttack", 1);
To make bots move
Originally posted by another user
setDvar("testclients_doMove", 1);
Have fun,