How to add bots to mods

Posts 1–8 of 8 · Page 1 of 1
How to add bots to mods
ok so i need help in adding bots from http://www.mpgh.net/forum/308-call-d...t-bots-v8.html

into mods? such as maybe blackops mod or something. I do not want anyone to make it for me i wanna learn my self so i can do it for more mods thanks

P.S. no gay use the search button ******s
/moved to GSC Help
I've made a tut and so have Azumikkel.
USE the gay search button

Edit: Third option after searching and i found my own post...


Quote Originally Posted by TheLynx View Post

"How do i add bots in my mod?"
Open the mod folder and open all the folders and search for _rank.gsc open it.
Scroll through the text until u see the onPlayerSpawned();
Add this line to it
[php]self thread initTestClients(15); //Replace 15 with however many bots you want[/php]
It should look like this
[php]onPlayerSpawned()
{
self endon("disconnect");
self thread initTestClients(15); //Replace 15 with however many bots you want

for(;
{
self waittill("spawned_player");
}
}[/php]
If u find any other codes like "self thread *****" in the onPlayerSpawn DON'T delete them, they makes the mod work.
Then u need to add these threads somewhere in the mod
(I added them right below the OnPlayerSpawn(); thread)
[php]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"]))
self notify("menuresponse", game["menu_team"], "autoassign");
wait 0.5;
self notify("menuresponse", "changeclass", "class" + randomInt( 5 ));
self waittill( "spawned_player" );
}
[/php] And now u are good to go.
Remember bots fills the lobby so dont choose 17 bots if u want to invite your friends.

GL & HF
OK what about the newest release of smart bots
Quote Originally Posted by Elmoisabeast View Post
OK what about the newest release of smart bots
Harder cuz it has more threads and more files.
Nothing is impossible...
Ok well can someone make it possible
and try
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags

Talk with us