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.

exports['jpr-housingsystem']:GiveStarterApartment("StartingApartment", vector3(260.86, -999.27, -100.01), function()
        FreezeEntityPosition(ped, false)
        RenderScriptCams(false, true, 500, true, true)
        SetCamActive(cam, false)
        DestroyCam(cam, true)
        SetCamActive(cam2, false)
        DestroyCam(cam2, true)
        SetEntityVisible(ped, true)

        Wait(500)
        TriggerEvent('qb-clothes:client:CreateFirstCharacter')
end)

The coordinates you see after “StartingApartment”, are the coordinates where you want the player to be when you open the clothing menu, why do we do this?

Because sometimes, players appear near the door after obtaining the starting apartment, and don't have the space to use the clothing menu correctly.

So, if necessary, you can provide the coordinates where you'd like the player to use the menu (it has to be inside the shell you're using).

If you're using the default Starting Aparment provided by the script, rest assured, you don't need to change anything, as the coords are correct.

Last updated