Events & Commands

Housing Exports

Use this export to know if a player is inside a house or not:

exports["jpr-housingsystem"]:isInHouse()

Use this export to know if a player owns a house or apartment:

exports["jpr-housingsystem"]:PlayerHaveAnyHouse(Here put citizen id or player identifier on esx)

Use this export to give keys to a player:

exports["jpr-housingsystem"]:AddKeyHolder(Citizen ID or Identifier of new keyholder,House or Apartment name,Citizen ID or Identifier of owner)

Radial Menu Events

Change Stash:

TriggerEvent('jpr-housingsystem:client:ChangeStashCommand')

Change Wardrobe:

TriggerEvent('jpr-housingsystem:client:ChangeWardrobeCommand')

Change Logout:

TriggerEvent('jpr-housingsystem:client:ChangeLogoutCommand')

Give starter apartment

To give a start aparment you just need to have a apartment created and know is name.

QBCore.Functions.TriggerCallback('jpr-housingsystem:server:giveStarterApartment', function(houseInfos)
        if houseInfos then
                local infos = {
                        args = houseInfos
                }

                DoScreenFadeIn(500)
                TriggerEvent("jpr-housingsystem:client:entrarCasaComprada", infos)

                Wait(3500)
                SetEntityCoords(PlayerPedId(), 260.86, -999.27, -100.01)
                TriggerEvent('qb-clothes:client:CreateFirstCharacter')
            end
end, "StartingApartment")

If you change apartment name you should change to one that is already created or just leave it default.

Last updated