Exports

There are 17 exports included with the script (all are client-side).

IsSitting

Returns if the local player is sitting.

exports.sit:IsSitting()

Example

---@return boolean isSitting
local isSitting = exports.sit:IsSitting()
print("isSitting:", isSitting)

IsLaying

Returns if the local player is laying down.

exports.sit:IsLaying()

Example

---@return boolean isLaying
local isLaying = exports.sit:IsLaying()
print("isLaying:", isLaying)

IsSittingOrLaying

Returns if the local player is sitting or laying.

Example

IsNearSeat

Returns if the local player is closer than Config.MaxInteractionDist to a seat.

Example

IsNearBed

Returns if the local player is closer than Config.MaxInteractionDist to a bed.

Example

GetClosestSeat

Returns the closest seat to the player.

Example

GetClosestBed

Returns the closest bed to the player.

Example

SitOnClosestSeat

Makes the local player sit on the closest seat.

LayOnClosestBed

Makes the local player lay down on the closest bed.

StopCurrentAction

Makes the local player get up if they are sitting or laying down.

Example

DisableSitting

Disables sitting. If reason isn't specified it will be handled as 'default' internally.

Example

DisableLaying

Disables laying. If reason isn't specified it will be handled as 'default' internally.

Example

DisableSittingAndLaying

Disables sitting and laying. If reason isn't specified it will be handled as 'default' internally.

Example

IsSittingDisabled

Returns if sitting is disabled as the first return value, and the reason (if applicable) as the second value.

Example

IsLayingDisabled

Returns if laying is disabled as the first return value, and the reason (if applicable) as the second value.

Example

GetSitDisableReasons

Returns the reasons that sitting is disabled, returns an empty table if there are no reasons.

Example

GetLayDisableReasons

Returns the reasons that laying is disabled, returns an empty table if there are no reasons.

Example

Last updated