Origen Network Store
  • 👋Welcome to Origen Network Store
  • 🆘¿You need help?
  • ❓FAQS
  • 👮Origen Police
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • Pma-Voice
    • 📙Guide of Use
      • 💻Police CAD
        • Dispatch
        • Citizen Search
        • Reports
        • Vehicles
        • Criminal Code
        • Search and Capture
        • Debtors
        • Federal Management
        • Agent Management
        • Security Cameras
        • Radio
        • Time Control
        • Operations
      • 📄Interaction Menu
      • 📹Vehicle Radar
      • 🚔Sirens System
      • 🔦Evidence System
      • 🎛️Mini Dispatch
      • 🚁Helicopter Camera
      • 🪪Badges
      • ⛓️Federal System
      • 🔫Holster
      • 🐕K9 Dog
    • ❓Frequent Questions
    • ⚙️Configuration
      • Framework
      • Armoury
      • Commands
      • Confiscate
      • Evidences
      • Federal
      • Holster
      • K9
      • Licenses
      • Markers
      • Names
      • Outfits
      • Permissions
      • Props
      • Radio
      • Vehicles
    • #️⃣Exports
      • Client Exports
      • Server Exports
  • 📻Origen Radio
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • Pma-Voice
    • ⚙️Configuration
  • 🛠️Origen Admin
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
  • 🏎️Origen Races
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • #️⃣Exports
      • Client Exports
  • 🔫Origen Ilegal
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • qb-inventory
    • 💬Commands
    • ♻️Exports
  • 🏚️Origen Housing
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • ⚙️API
      • Exports
      • Hooks
      • Events
      • Scripts Support
        • 📱LB-Phone
  • 🚙Origen Parking
    • ⚠️Dependencies
    • 🔧Installation
      • QBCore SQL
      • ESX SQL
    • ⚙️Configuration
    • ♻️Exports
  • 💼origen_inventory
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • ⛏️Scripts Support
      • 📱LB Phone
        • 2️From v2.1.14
      • 🏨QB Apartments
      • 🔫QB-Weapons
      • 🔨Jobs creator (Jaksam)
    • ♻️Exports
      • 🛥️Client Exports
      • ⚓Server
        • Hooks
    • How to
  • 🕵️‍♂️origen_hostage
    • 🔧Installation
  • 👷‍♂️Origen Masterjob
    • 🔧Installation
      • SQL
      • qb-inventory
      • qs-inventory
      • ox_inventory
    • ♻️Exports
  • QBCORE
    • 🍔origen_hud
      • ❔¿What is origen_hud?
      • 🔧Installations origen_hud
      • ❓FAQS origen_hud
    • 💬origen_notify
      • ❔¿What is origen_notify?
      • 🔧Installations origen_notify
      • ❓FAQS origen_notify
        • 🥬Snippets origen_notify
    • ⏸️origen_pausemenu
      • ❔¿What is origen_pausemenu?
      • 🔧Installations origen_pausemenu
      • ❓FAQS origen_pausemenu
      • 🔑EXPORTS origen_pausemenu
    • 🥷origen_blackmarket
      • ❔¿What is origen_blackmarket?
      • 🔧Installations origen_blackmarket
      • ❓FAQS origen_blackmarket
      • 🥬Snippets origen_blackmarket
    • 🧑‍🤝‍🧑origen_titlemenu
      • ❔¿What is origen_titlemenu?
      • 🔧Installations origen_titlemenu
      • ❓FAQS origen_titlemenu
      • 🥬Snippets origen_titles (soon)
    • 🚗origen_importheist
      • ❔¿What is origen_importheist?
      • 🔧Installations origen_importheist
      • ❓FAQS origen_importheist
      • 🥬Snippets origen_importheist (soon)
  • ESX
    • 🍔origen_hud
      • ❔¿What is origen_hud?
      • 🔧Installations origen_hud
      • ❓FAQS origen_hud
    • 💬origen_notify
      • ❔¿What is origen_notify?
      • 🔧Installations origen_notify
      • ❓FAQS origen_notify
      • 🥬Snippets origen_notify
    • ⏸️origen_pausemenu
      • ❔¿What is origen_pausemenu?
      • 🔧Installations origen_pausemenu
      • ❓FAQS origen_pausemenu
      • 🔑EXPORTS origen_pausemenu
    • 🧑‍🤝‍🧑origen_titlemenu
      • ❔¿What is origen_titlemenu?
      • 🔧Installations origen_titlemenu
      • ❓FAQS origen_titlemenu
      • 🥬Snippets origen_titles (soon)
    • 🚗origen_importheist
      • ❔¿What is origen_importheist?
      • 🔧Installations origen_importheist
      • ❓FAQS origen_importheist
      • 🥬Snippets origen_importheist (soon)
Powered by GitBook
On this page
  • Client Exports
  • Server Exports
  1. Origen Housing
  2. API

Exports

With these exports, you will be able to manipulate the system from scripts external to it.

Client Exports

InsideHouse
exports['origen_housing']:insideHouse()

Check if a player is inside a house, return true if inside or false if not inside.

Example:

local inside = exports['origen_housing']:insideHouse()
if inside then
    print("Player is inside a house.")
else
    print("Player is not inside a house.")
end
GetHouses
exports['origen_housing']:getHouses()

Returns all server houses as a client request.

Example:

local houses = exports['origen_housing']:getHouses()
for , house in ipairs(houses) do
    print(house.name)
end
GetPlayerHouses
-- @param identifier (string): The identifier of the character.
-- If empty, it will take the client identifier.
exports['origen_housing']:getPlayerHouses(identifier)

Returns a table with house data or an empty table if there are no houses.

IsBusy
exports['origen_housing']:isBusy()

Returns if the player is busy using menus or creating a house.

Example:

local busy = exports['origen_housing']:isBusy()
if busy then
    print("Player is busy.")
else
    print("Player is not busy.")
end
OpenHouseMenu
exports['origen_housing']:OpenHouseMenu()

Export to open the house management menu

CloseHouseMenu
exports['origen_housing']:CloseHouseMenu()

Esport to close the house management menu

Server Exports

GetAllHouses
exports['origen_housing']:getAllHouses()

Returns all server houses as a server request.

Example:

local houses = exports['origen_housing']:getAllHouses()
for _, house in ipairs(houses) do
    print(house.name)
end
GetHouse
-- @param houseID (int): The ID of the house.
exports['origen_housing']:getHouse(houseID)

Returns a specific house using the ID of the house.

Example:

local houseID = 1
local house = exports['origen_housing']:getHouse(houseID)

if house then 
    print(house.name)
else
    print('The house id is not valid')
end
GetOwnedHouses
-- @param identifier (string): The identifier of the character.
exports['origen_housing']:getOwnedHouses(identifier)

Returns all houses of a certain character using their identifier.

Example:

local identifier = 'AB12345'
local ownedHouses = exports['origen_housing']:getOwnedHouses(identifier)
for _, houseID in ipairs(ownedHouses) do
    local house = exports['origen_housing']:getHouse(houseID)
    
    if house then 
       print(house.name) 
    end
end
SetHouseOwner
-- @param houseID (int): The identifier of the house.
-- @param source (int): The player source
exports['origen_housing']:setHouseOwner(houseID, source)

Establishes the player as the owner of the house.

Example:

local houseID = 1
local success = exports['origen_housing']:setHouseOwner(houseID, source)

if success then
    print('House ownership assigned successfully.')
else
    print('Failed to assign house ownership.')
end
RegisterHook
-- @param eventName (string): Name of hook event
-- @param options (table): Table of hook options
exports.origen_housing:registerHook(eventName, function(payload)
end, options)
RemoveHooks
-- @param id (int): Hook id
exports.origen_housing:removeHooks(id)
PreviousAPINextHooks

Last updated 3 months ago

🏚️
⚙️
Examples of use
Examples of use