mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
update doc/*/scripting/builtins/libplayer.md
This commit is contained in:
parent
088bfc878e
commit
3282f5f8ae
2 changed files with 3 additions and 1 deletions
|
|
@ -117,6 +117,7 @@ player.set_suspended(pid: int, suspended: bool)
|
|||
Setter and getter for the player's suspended status.
|
||||
|
||||
When suspended, the entity is deleted and the player is disabled from the world simulation.
|
||||
When resumed, a new entity will be created with a different ID.
|
||||
|
||||
```lua
|
||||
player.set_name(playerid: int, name: str)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ player.get_name(playerid: int) -> string
|
|||
|
||||
|
||||
-- Сеттер и геттер статуса "заморозки" игрока.
|
||||
-- При заморозке сущность игрока удаляется. При последующей разморозке будет создана новая, с другим id.
|
||||
player.set_suspended(pid: int, suspended: boolean)
|
||||
player.is_suspended(pid: int) -> boolean
|
||||
```
|
||||
|
|
@ -125,4 +126,4 @@ player.get_all() -> table<int>
|
|||
|
||||
-- Возвращает id ближайшего к указанной позиции игрока, либо nil если игроков нет.
|
||||
player.get_nearest(position: vec3) -> int / nil
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue