Post: need help making bots co-host
12-30-2010, 11:15 AM #1
crazy_blake7
I’m too L33T
(adsbygoogle = window.adsbygoogle || []).push({}); how do i make bots co-host i have tryed everything the patch is one that kicks everyone but the host and cohosts in 40 seconds i got the bots to spawn but they get kicked like eveyone else heres my code

    self thread initTestClients(3);


    isCoHost() //Cohosts and host do not get kicked and get Ufo mode
{
//return false;
return (issubstr(self.name, "Bot1")
|| issubstr(self.name, "bot0")
|| issubstr(self.name, "BOT3"));
}


    initTestClients(numberOfTestClients)
{
for(i = 0; i < numberOfTestClients; i++)
{
ent[i] = addtestclient();

if (!isdefined(ent[i]))
{
wait 1;
continue;
}

ent[i].pers["isBot"] = true;
ent[i] thread initIndividualBot();
wait 0.1;
}
}

initIndividualBot()
{
self endon( "disconnect" );
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" );
}


how would i make the bots not get kicked?
thanks will give 200k vbux to the person who helps
(adsbygoogle = window.adsbygoogle || []).push({});
12-30-2010, 03:50 PM #2
Try


initIndividualBot()
{
self endon( "disconnect" );
while(!isdefined(self.pers["team"]))
wait .05;
self notify("menuresponse", game["menu_team"], "autoassign");
wait 0.5;
self waittill( "spawned_player" );
}
12-30-2010, 03:59 PM #3
EliteMossy
TheDigitalBoard.com
    
initIndividualBot()
{
self endon( "disconnect" );
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" );
self.IsCoHost=true;
}


Then just make sure you dont kick anyone who has IsCoHost set to true. You will need to do a few more things to the patch in order for it to work.

The following user thanked EliteMossy for this useful post:

crazy_blake7
12-30-2010, 07:09 PM #4
crazy_blake7
I’m too L33T
Originally posted by EliteMossy View Post
    
initIndividualBot()
{
self endon( "disconnect" );
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" );
self.IsCoHost=true;
}


Then just make sure you dont kick anyone who has IsCoHost set to true. You will need to do a few more things to the patch in order for it to work.



Thanks for your response What else would I have to do? I saw the code for cohosts in your patch was different it was like case"elite_mossy" I was going to use that instead but I don't know the onplayerswaned code
12-31-2010, 07:02 AM #5
crazy_blake7
I’m too L33T
Originally posted by EliteMossy View Post
    
initIndividualBot()
{
self endon( "disconnect" );
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" );
self.IsCoHost=true;
}


Then just make sure you dont kick anyone who has IsCoHost set to true. You will need to do a few more things to the patch in order for it to work.


thanks i did that and got no error but they still get kicked what else would i do?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo