Skip to content

Exports

Exports

The sit engine is exposed as client exports so other resources can drive it. All exports are client-side on bupa-chaircreator.

BupaSitOn

Seat the local player on an arbitrary seat definition.

lua
exports['bupa-chaircreator']:BupaSitOn({
    entity = 0, -- 0 for a world coordinate, or a prop entity handle
    sit = {
        type = 'chair', -- a Config.SitTypes key
        seats = { vector4(x, y, z, heading) },
    },
    raycast = false,
})

BupaLayOn

Lay variant, for beds / loungers. Same shape, using a Config.LayTypes key.

lua
exports['bupa-chaircreator']:BupaLayOn({
    entity = 0,
    bed = {
        type = 'bed',
        seats = { vector4(x, y, z, heading) },
    },
    raycast = false,
})

BupaStop

Get up / stop the current sit or lay action.

lua
exports['bupa-chaircreator']:BupaStop()

IsSitting

Returns whether the local player is currently seated.

lua
if exports['bupa-chaircreator']:IsSitting() then
    -- player is sitting
end

Other helpers are also exported: IsLaying, IsNearSeat, IsNearBed, GetClosestSeat, GetClosestBed, SitOnClosestSeat, LayOnClosestBed, StopCurrentAction and BupaLoadAnim(dict).