Add on_entity_spawned and on_entity_despawned events

This commit is contained in:
Xertis 2026-04-04 01:53:49 +03:00
parent 936a5c8525
commit 518d5d5ae4
8 changed files with 75 additions and 1 deletions

View file

@ -156,6 +156,18 @@ function on_block_interact(blockid, x, y, z, playerid) -> bool
Вызывается при нажатии на блок ПКМ. Предотвращает установку блоков, если возвращает `true`
```lua
function on_entity_spawned(uid)
```
Вызывается после спавна сущности
```lua
function on_entity_despawned(uid)
```
Вызывается после удаления сущности, на момент вызова события сущность с переданным uid уже удалена
```lua
function on_player_tick(playerid: int, tps: int)
```