mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update doc/*/scripting/builtins/libplayer.md
This commit is contained in:
parent
9cb9b095e8
commit
c0196ef092
2 changed files with 36 additions and 0 deletions
|
|
@ -142,3 +142,21 @@ player.get_entity(playerid: int) -> int
|
|||
```
|
||||
|
||||
Returns unique identifier of the player entity
|
||||
|
||||
```lua
|
||||
player.get_all_in_radius(center: vec3, radius: number) -> table<int>
|
||||
```
|
||||
|
||||
Returns an array of player IDs within a sphere with center `center` and radius `radius`.
|
||||
|
||||
```lua
|
||||
player.get_all() -> table<int>
|
||||
```
|
||||
|
||||
Returns an array of all active player IDs.
|
||||
|
||||
```lua
|
||||
player.get_nearest(position: vec3) -> int
|
||||
```
|
||||
|
||||
Returns the ID of the player closest to the specified position, or nil if there are no players.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue