Browse docs
Respawn
Action hook for when a player respawns from the hospital via the deathscreen.
Actions
| Action | Side | Description |
|---|---|---|
respawn:hospital | server | The player pressed the respawn button and respawned from the hospital. |
Context
| Key | Type | Description |
|---|---|---|
playerId | number | The server ID of the player who respawned. |
removedItems | table | List of items, accounts and weapons removed on respawn. Each entry has name, amount, and type ("item", "account", or "weapon"). |
Example
server.lua
exports["sky_ambulancejob"]:onAction("respawn:hospital", function(ctx)
print(("Player %s respawned from hospital, %d entries removed"):format(ctx.playerId, #ctx.removedItems))
for _, entry in ipairs(ctx.removedItems) do
print((" [%s] %s x%d"):format(entry.type, entry.name, entry.amount))
end
end)
Support
Need help? Our support team is always ready to assist
Join Discord