-
Notifications
You must be signed in to change notification settings - Fork 0
New library: player
dounai2333 edited this page Jan 20, 2025
·
2 revisions
The player library is used to get the Lua objects that represent players in-game.
dounai_lib.player.GetAll(mode, no_SourceTV)Gets all the current players in the server (not including connecting clients). If no_SourceTV is true, the Source TV will be ignored.
Available modes:
0: All
1: Alive Players
2: Bots
3: Real Players
Return: table
mode: number
no_SourceTV: bool
dounai_lib.player.GetAllAlives()Gets all the current aliving players on the server.
Return: table
dounai_lib.player.GetBots()Returns a table of all bots on the server.
Return: table
dounai_lib.player.GetHumans()Returns a table containing all human players (non-bot/AI).
Return: table
dounai_lib.player.Random(alive_only)Get a random player. If alive_only is true, the only aliving player will be selected.
Return: player
alive_only: bool