Exports

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

Client Exports

chevron-rightInsideHousehashtag
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
chevron-rightGetNearbyHousehashtag
exports.origen_housing:getNearbyHouse()

Returns the number of the closest house. Returns false if no house is nearby.

Example:

local houseNumber = exports.origen_housing:getNearbyHouse()
if houseNumber then
    print("Nearest house: " .. houseNumber)
else
    print("No house nearby")
end
chevron-rightGetHouseshashtag
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
chevron-rightGetPlayerHouseshashtag
-- @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.

chevron-rightIsBusyhashtag
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
chevron-rightOpenHouseMenuhashtag

Export to open the house management menu

chevron-rightCloseHouseMenuhashtag

Esport to close the house management menu

Server Exports

chevron-rightGetAllHouseshashtag

Returns all server houses as a server request.

Example:

chevron-rightGetHousehashtag

Returns a specific house using the ID of the house.

Example:

chevron-rightGetOwnedHouseshashtag

Returns all houses of a certain character using their identifier.

Example:

chevron-rightSetHouseOwnerhashtag

Establishes the player as the owner of the house.

Example:

chevron-rightRegisterHookhashtag
chevron-rightRemoveHookshashtag

Last updated