Garry's Mod Wiki

player.GetBots

  table player.GetBots()

Description

Returns a table of all bots on the server.

Returns

1 table
A table only containing bots ( AI / non human players )

Example

Kicks all bots from the server.

for _, bot in ipairs(player.GetBots()) do bot:Kick("Bot's not allowed") end