---@return boolean isSittingOrLaying
local isSittingOrLaying = exports.sit:IsSittingOrLaying()
print("isSittingOrLaying:", isSittingOrLaying)
exports.sit:IsNearSeat()
---@return boolean isNearSeat
local isNearSeat = exports.sit:IsNearSeat()
print("isNearSeat:", isNearSeat)
exports.sit:IsNearBed()
---@return boolean isNearBed
local isNearBed = exports.sit:IsNearBed()
print("isNearBed:", isNearBed)
exports.sit:GetClosestSeat()
---@return boolean found if any position was found or not
---@return table closest table containing the data about the closest seat
local found, closest = exports.sit:GetClosestSeat()
if found then
-- print(json.encode(closest, {indent=true}))
print("type:", closest.type) -- "sit"
print("entity:", closest.entity) -- number (0 if poly)
print("coords:", closest.coords) -- coords, vector3
print("distance:", closest.distance) -- distance, number
print("name:", closest.name) -- Poly name (if applicable)
print("group:", closest.group) -- Poly group
else
print("No seat was found!")
end
exports.sit:GetClosestBed()
---@return boolean found if any position was found or not
---@return table closest table containing the data about the closest bed
local found, closest = exports.sit:GetClosestBed()
if found then
-- print(json.encode(closest, {indent=true}))
print("type:", closest.type) -- "sit"
print("entity:", closest.entity) -- number (0 if poly)
print("coords:", closest.coords) -- coords, vector3
print("distance:", closest.distance) -- distance, number
print("name:", closest.name) -- Poly name (if applicable)
print("group:", closest.group) -- Poly group
else
print("No seat was found!")
end
exports.sit:SitOnClosestSeat()
exports.sit:LayOnClosestBed()
exports.sit:StopCurrentAction()
if exports.sit:IsSitting() or exports.sit:IsLaying() then
exports.sit:StopCurrentAction()
end
exports.sit:DisableSitting(state, reason)
---@param boolean state
---@param string reason
exports.sit:DisableSitting(true, 'dead')
exports.sit:DisableLaying(state, reason)
---@param boolean state
---@param string reason
exports.sit:DisableLaying(true, 'dead')