qbcore-framework / qb-shops

Shops For QB-Core
GNU General Public License v3.0
27 stars 215 forks source link

model's despawning after time #86

Closed gypsychicken closed 2 years ago

gypsychicken commented 2 years ago

I have been using the updated qb shops recently, am having an issue where the ped models in the stores are despawning after a period of time. ensuring the resource replaces the peds and works as expected.

have not measured the time it take for them to despawn.

OGReaperx commented 2 years ago

I am experiencing the same thing, trying to figure out what the issue could be

LYRYCAL commented 2 years ago

yeah me too

OGReaperx commented 2 years ago

Are you guys using any sort of MLO?

gypsychicken commented 2 years ago

Are you guys using any sort of MLO?

Yes and no. In some areas we have MLO's and other place we do not. Either way, all shop peds despawn.

OGReaperx commented 2 years ago

Are you guys using any sort of MLO?

Yes and no. In some areas we have MLO's and other place we do not. Either way, all shop peds despawn.

Hmm yeah it's a bit confusing to say the least. I thought maybe the MLO's I'm using ( gabz ) could be the problem. But if it's still happening in standard interiors I have no idea what else it could be.

Roberto0202 commented 2 years ago

RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() createBlips() createPeds() end)

AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() == resourceName then createBlips() createPeds() end end)

RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() deletePeds() end)

AddEventHandler('onResourceStop', function(resourceName) if GetCurrentResourceName() == resourceName then deletePeds() end end)

Roberto0202 commented 2 years ago

this swich fixed it for me

gypsychicken commented 2 years ago

QBCore:Client:OnPlayerUnload

What exactly did you change? It looks the same to me.

LYRYCAL commented 2 years ago

RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() createBlips() createPeds() end)

AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() == resourceName then createBlips() createPeds() end end)

RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() deletePeds() end)

AddEventHandler('onResourceStop', function(resourceName) if GetCurrentResourceName() == resourceName then deletePeds() end end)

this one already on the script mate

BerkieBb commented 2 years ago

There is no code in qb-shops that despawns these peds after some time