JPResources Documentation
  • 👋Welcome to JPResources
  • Installation
    • 📲Phone System
      • Installation Page
        • QBCore
        • QBox
        • ESX
        • VRPex
      • Config File
      • Events & Commands
      • Custom APPs
      • Translations
      • Common Problems
      • Installation Video
    • 🏡Housing System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Events & Commands
      • How to add MLO House
      • How to add SHELL Tier
      • Translations
      • Common Problems
    • 🚨MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🏥EMS MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🎒Inventory
      • How to install
      • Events & Commands
      • Translations
      • Common Issues
    • 🚘Vehicle Shops
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💰Business System
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💼Job System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Translations
    • 📱Budget Phone
      • QBCore
    • ⚙️Crew System
      • QBCore
    • 👚Clothing System
      • QBCore
    • 🏢Garage System
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 👪Multichar
      • Installation Page
        • QBCore
        • ESX
    • 🔪Territories
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🎒Backpack
      • QBCore
    • 💴Moneywash
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🌊Poolcleaner Job
      • Installation Page
    • 🚗TDi Smoke
      • Installation Page
  • Support / Store
    • 🛠️Where i can find support and buy new scripts
    • 🛠️FiveM asset escrow errors
Powered by GitBook
On this page
  • Housing Exports
  • Radial Menu Events
  • Give starter apartment
  1. Installation
  2. Housing System

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.

If you change apartment name you should have it created on main_config.lua file, otherwise, just use our default one.

PreviousESXNextHow to add MLO House

Last updated 2 months ago

🏡