Garry's Mod Wiki

player.GetHumans

  table player.GetHumans()

Description

Returns a table containing all human players (non-bot/AI).

Unlike player.GetAll, this does not include bots.

This function returns a sequential table, meaning it should be looped with ipairs instead of pairs for efficiency reasons.

Returns

1 table
A table containing all human (non-bot/AI) players.