EH-DOCUMENTATION
  • ERROR HUB
    • Welcome
    • Terms Of Service
    • Customer Service
    • Common Issues
    • FAQ
    • Discord Guide
  • OUR SCRIPTS
    • Advanced Cutscene
      • Installation
      • Configuration
        • Clothing
        • Multicharacter
          • Renzu Multicharacter
          • ZSX Multicharacter
        • QB-Apartment
        • Vehicle Keys
      • Events and Exports
      • Shared Files
    • Codekit
      • Installation
  • HOUSING SHELLS
    • Modern & Classic Mid Shell
Powered by GitBook
On this page
  1. OUR SCRIPTS
  2. Codekit
  3. Configuration

QB-Apartment

Last updated 11 months ago

CtrlK

If you're using qb-apartment, follow these steps. Otherwise, you can skip this setup:

  1. Open the main.lua file in the qb-apartments/client folder.

  2. Insert the following code at the bottom of the main.lua file:

-- EH-Cutscene
local function DisableInApartment(house)
    TriggerServerEvent("qb-apartments:returnBucket")
    exports['qb-interior']:DespawnInterior(HouseObj, function()
        TriggerEvent('qb-weathersync:client:EnableSync')
        TriggerServerEvent("apartments:server:RemoveObject", CurrentApartment, house)
        TriggerServerEvent('qb-apartments:server:SetInsideMeta', CurrentApartment, false)
        CurrentApartment = nil
        InApartment = false
        CurrentOffset = 0
        TriggerServerEvent("apartments:server:setCurrentApartment", nil)

        DeleteInApartmentTargets()
        DeleteApartmentsEntranceTargets()
    end)
end

RegisterNetEvent('eh_cutscene:client:DisableInsideAparts', function()
    if not InApartment then
        return
    end
    DisableInApartment(ClosestHouse)
    print('^2Disabled Inside Apartment')
end)