qbcore-framework / qb-apartments

Apartment Script Used With QB-Core :house:
GNU General Public License v3.0
26 stars 199 forks source link

[BUG] - Reliable Network Overflow (clientside) #126

Closed Repentz closed 5 months ago

Repentz commented 5 months ago

Describe the bug You will see many users timing out at random.

To Reproduce Steps to reproduce the behavior:

  1. run latest build.

Expected behavior When some users are ingame, they may see a timeout for the screenshot below.

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

You can fix this by making changes and checks to SetClosestApartment function client side, as it is being referenced too often causing the crash.

in particular,

QBCore.Functions.TriggerCallback('apartments:IsOwner', function(result) IsOwned = result DeleteApartmentsEntranceTargets() DeleteInApartmentTargets() end, ClosestHouse)