Post: Botspawning need help
12-31-2014, 10:27 PM #1
misthinking
Save Point
(adsbygoogle = window.adsbygoogle || []).push({}); How do i get this to only spawn 1 bot not like 50

doBots(a)
{
for(i = 0; i < a; i++)
{
self thread maps\mp\bots\_bot::spawn_bot("axis");
wait 1;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
01-01-2015, 03:33 AM #2
One
At least I can fight
i don't know gsc, but your using a for loop, so its going to keep spawning them intill i is greater than a
01-01-2015, 10:45 AM #3
{
self thread Spawnbot();
self iprintln("^2Bot Spawned");
}

Try that code
01-01-2015, 04:31 PM #4
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by misthinking View Post
How do i get this to only spawn 1 bot not like 50

doBots(a)
{
for(i = 0; i < a; i++)
{
self thread maps\mp\bots\_bot::spawn_bot("axis");
wait 1;
}
}


I think thats a code I posted and to use it correctly you need to define a when calling the function.
So do this when you call it ::doBots, (1) or how ever you call functions the important part is after the , (1)

Originally posted by ImEvilMinded View Post
{
self thread Spawnbot();
self iprintln("^2Bot Spawned");
}

Try that code


If he used that he would freeze as he'd be using a undefined function - Spawnbot .
01-01-2015, 08:31 PM #5
misthinking
Save Point
Its okay, I got it working, thanks guys
01-06-2015, 01:56 PM #6
Originally posted by ImEvilMinded View Post
{
self thread Spawnbot();
self iprintln("^2Bot Spawned");
}

Try that code


You made me giggle.
01-07-2015, 06:24 AM #7
RiggsDiggs
Can’t trickshot me!
Insert this into your functions

    
spawn1()
{
self thread Spawnbot();
self iprintln("^2Bot Spawned");
}

SpawnBot(team)
{
maps/mp/bots/_bot::spawn_bot(team);
}



This is just an example of where you put it. (Don't insert this into your menu options just the last part in red)


    
self add_option("SubMenu7", [COLOR="#FF0000"]"Spawn 1 Bot", ::spawn1[/COLOR]);



If you have any issues just quote this and i'll respond Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo