• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Add Test Bots to your mod
#1
Hello Superman

This is a frequent question, so I do a tutorial for it.

Add this code anywhere and put in Init(): level thread AddBots(number of bots you want,what team);

Code:
AddBots(number,team)  
{
    for(i=0;i<number;i++)
    {
        botz[i] = addtestclient();
        if(!isdefined(botz[i]))
        {
            wait 1;
            continue;
        }
        botz[i].pers["isBot"] = true;
        botz[i] thread BotData(team);
        wait 0.1;
    }
}

BotData(team)
{
    self endon("disconnect");
    while(!isdefined(self.pers["team"]))
        wait 0.05;
    self notify("menuresponse",game["menu_team"],team);
    wait 0.05;
    self notify("menuresponse","changeclass","class"+randomInt(5));
}

If you want lvl 70 add in OnPlayerSpawned()

Code:
self SetPlayerData("experience",9999999999999999999);

The command to spawn a test bot is this:

Code:
name = addtestclient();
  Reply
#2
is it possible to change the name of the bot ?and to choose what kind of bot is it gonna be, so it seems like a sniper with omas maybe
  Reply
#3
@alvarogt95 onPlayerSpawned

Code:
if(self pers["isBot"] == true) self giveWeapon("herpderp");

Or something like that?
  Reply
#4
(03-05-2012, 09:43)JariZ Wrote: @alvarogt95 onPlayerSpawned

Code:
if(self pers["isBot"] == true) self giveWeapon("herpderp");

Or something like that?

Fixed

Code:
if(self.pers["isBot"]) self giveWeapon( "onemanarmy_mp", 0, false );
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Private Match Bots? (NO CT) Strazeeh 12 9,135 10-02-2013, 16:52
Last Post: Strazeeh
  Bots in MW3/IW5M DidUknowiPwn 38 73,990 07-25-2013, 17:26
Last Post: OrangePL
  No Hope: AI Zombies [Bots] d0h! 10 83,454 07-23-2013, 17:38
Last Post: xXzKingPinzXx
  [TEST] MW2 Old School v0.2 iAegle 10 12,413 07-15-2013, 21:08
Last Post: gunca
  smart bots CheGuevara 8 6,154 06-01-2013, 08:23
Last Post: CheGuevara
  Spam bots on ItsMods AZUMIKKEL 10 7,369 05-08-2013, 23:05
Last Post: AZUMIKKEL
  PTK Bots pflaurie 5 4,044 03-16-2013, 23:52
Last Post: Nekochan
Tongue Quaratine Chaos Zombie Mod v3.1 + Smart Bots ddaavvee 9 22,891 09-08-2012, 13:02
Last Post: jacobscience123
  WaW MP AI bots? Rendflex 4 3,412 08-31-2012, 02:40
Last Post: Nukem
  [Request] hired help to incorporate dice weapons into bots mod MauiDeath 3 3,479 08-20-2012, 08:26
Last Post: d0h!

Forum Jump:


Users browsing this thread: 2 Guest(s)