qb-apartments icon indicating copy to clipboard operation
qb-apartments copied to clipboard

[BUG] Apartment.Starting = False Not letting players inside

Open xastr0 opened this issue 1 year ago • 10 comments

Describe the bug Every time i set the Apartment.Starting to false the players are not able to use the apartments at all, the blips to show where they are disappeared, when you go to the to the vector- it shows the menu, you click "Move Here" and it doesnt let players go inside.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'qb-apartment/config.lua '
  2. Click on apartment.starting = false.'
  3. restart- blips disappear/ can't enter apartment
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: [7/31/2023]
  • Are you using custom resource? which ones? removed qb-clothing to illeium appearnace -
  • Have you renamed qb- to something custom? [no]

Additional context Add any other context about the problem here.

xastr0 avatar Aug 01 '23 02:08 xastr0

it's because it only inserts into the database when you apartment.starting = true, you'll have to update the update event to insert into the database if its not already present

UwUway avatar Aug 04 '23 10:08 UwUway

it's because it only inserts into the database when you apartment.starting = true, you'll have to update the update event to insert into the database if its not already present

And how would you do that? Having the same issue

JonnyShertz avatar Sep 08 '23 14:09 JonnyShertz

I have solved this problem and I have also made the cost of moving and the first purchase in apartment buildings 5000$.

BARISHU-code avatar Oct 08 '23 00:10 BARISHU-code

I have solved this problem and I have also made the cost of moving and the first purchase in apartment buildings 5000$.

how did u do that can u send me the code

fivemelite avatar Nov 06 '23 23:11 fivemelite

I have solved this problem and I have also made the cost of moving and the first purchase in apartment buildings 5000$.

If you are gonna solve the problem and not show how then don't say anything.

oofbloxwastaken avatar Nov 17 '23 23:11 oofbloxwastaken

Hi just saw your messages, friends, I will share the solved version in my own profile, you can edit it according to yourself.

BARISHU-code avatar Nov 17 '23 23:11 BARISHU-code

client.lua replase = fix

RegisterNetEvent('qb-multicharacter:client:spawnLastLocation', function(coords, cData)
    QBCore.Functions.TriggerCallback('apartments:GetOwnedApartment', function(result)
        if result then
            TriggerEvent("apartments:client:SetHomeBlip", result.type)
        end

        local ped = PlayerPedId()
        SetEntityCoords(ped, coords.x, coords.y, coords.z)
        SetEntityHeading(ped, coords.w)
        FreezeEntityPosition(ped, false)
        SetEntityVisible(ped, true)
        local PlayerData = QBCore.Functions.GetPlayerData()
        local insideMeta = PlayerData.metadata["inside"]
        DoScreenFadeOut(500)

        if insideMeta.house then
            TriggerEvent('qb-houses:client:LastLocationHouse', insideMeta.house)
        elseif insideMeta.apartment.apartmentType and insideMeta.apartment.apartmentId then
            TriggerEvent('qb-apartments:client:LastLocationHouse', insideMeta.apartment.apartmentType, insideMeta.apartment.apartmentId)
        end

        TriggerServerEvent('QBCore:Server:OnPlayerLoaded')
        TriggerEvent('QBCore:Client:OnPlayerLoaded')
        Wait(2000)
        DoScreenFadeIn(250)
    end, cData.citizenid)
end)

PtaxaDev avatar Nov 18 '23 15:11 PtaxaDev

Someone who can help me, I have tried everything above and nothing works! Look at the video below https://medal.tv/games/gta-v/clips/24pDi1-gI_e4pi/d1337uDFBCOs?invite=cr-MSxvbXIsMTU3MTg1MjMyLA

Fgselman avatar Apr 03 '24 13:04 Fgselman

I don't understand what the question is, If it doesn't work from the beginning, it's sad, if not, I don't understand what you've done or what needs to be done, please tell me more, maybe I can help you.

ср, 3 апр. 2024 г. в 15:24, Fgselman @.***>:

Someone who can help me, I have tried everything above and nothing works! Look at the video below

https://medal.tv/games/gta-v/clips/24pDi1-gI_e4pi/d1337uDFBCOs?invite=cr-MSxvbXIsMTU3MTg1MjMyLA

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-apartments/issues/117#issuecomment-2034606514, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4RTNWK2P3AOIV4NQQSDXTDY3P7KLAVCNFSM6AAAAAA27CYB66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGYYDMNJRGQ . You are receiving this because you commented.Message ID: @.***>

PtaxaDev avatar Apr 03 '24 13:04 PtaxaDev

I dont know what I have done and I dont get any errors, but everytime i relogg my apartment will not be saved, and when i enter the game and move to a new one it wont let me enter, (like i show in the video)

Fgselman avatar Apr 03 '24 14:04 Fgselman