Browse docs

Respawn

Action hook for when a player respawns from the hospital via the deathscreen.

Actions

ActionSideDescription
respawn:hospitalserverThe player pressed the respawn button and respawned from the hospital.

Context

KeyTypeDescription
playerIdnumberThe server ID of the player who respawned.
removedItemstableList 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