How to make bot join team? Because when I type "bot" now it comes as no team, just black guy without animations.
as far, theres no default command to make them join a team, you need to make one yourself.
Get the object of the bot and use SetTeam: [url]https://wiki.garrysmod.com/page/Player/SetTeam[/url]
Late to the party I know, but this is a function I made a while ago.
[code]
function TeamedBot()
RunConsoleCommand("bot")
timer.Simple(5,function()
for k, v in pairs(player.GetBots()) do
v:SetTeam(--TEAM NAME--)
end
end)
end
concommand.Add("teamed_bot", TeamedBot)
[/code]
Or if you want it to join a random team do this.
[code]
v:SetTeam(math.random(TEAM1 ,TEAM2, TEAM3))
[/code]
Sorry, you need to Log In to post a reply to this thread.