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.
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.
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.
exports['bupa-chaircreator']:BupaStop()IsSitting
Returns whether the local player is currently seated.
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).