Skip to main content

Renzu Spawn

Integration for renzu_spawn with the housing

Client Side​

This is the snippet.

    local houses = exports.bcs_housing:GetOwnedHomes()
local options = {}
for k,v in pairs(houses) do
table.insert(options, {
name = v.name, -- img name
label = v.name,
coord = vector4(v.entry.x, v.entry.y, v.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:GetOwnedHomes()
local options = {}
for k,v in pairs(houses) do
table.insert(options, {
name = v.name, -- img name
label = v.name,
coord = vector4(v.entry.x, v.entry.y, v.entry.z, 142.27),
info = 'My House'
})
end
exports.renzu_spawn:Selector(nil,options)
end
end)