Skip to main content

Renzu Spawn

Integration for renzu_spawn with the housing

Client Side​

This is the snippet.

    local houses = exports.bcs_housing:GetOwnedHomeKeys()
local options = {}
for k,v in pairs(houses) do
local entry = v.properties.complex == 'Flat' and v.properties.data.flat.coords or v.properties.entry
table.insert(options, {
name = v.properties.name, -- img name
label = v.properties.ame,
coord = vector4(entry.x, entry.y, entry.z, 142.27),
info = 'My House'
})
end
exports.renzu_spawn:Selector(nil,options)

If you are not using multicharacter then you can put the code above like below in

renzu_spawn/client/main.lua
RegisterNetEvent('playerSpawned', function()
if not Config.Multicharacters then
local houses = exports.bcs_housing:GetOwnedHomeKeys()
local options = {}
for k,v in pairs(houses) do
local entry = v.properties.complex == 'Flat' and v.properties.data.flat.coords or v.properties.entry
table.insert(options, {
name = v.properties.name, -- img name
label = v.properties.name,
coord = vector4(entry.x, entry.y, entry.z, 142.27),
info = 'My House'
})
end
exports.renzu_spawn:Selector(nil,options)
end
end)