Merge pull request #671 from iSentrie/patch-6

fix(esx_lscustom): fixes loop and players count
This commit is contained in:
Benzo
2022-11-13 22:08:51 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -535,7 +535,7 @@ CreateThread(function()
DisableControlAction(0, 75, true) -- Disable exit vehicle
DisableControlAction(27, 75, true) -- Disable exit vehicle
end
Wait(0)
Wait(Sleep)
end
end)
end
+2 -2
View File
@@ -25,7 +25,7 @@ AddEventHandler('esx:playerDropped', function(src)
for k,v in pairs(Customs[src]) do
local entity = NetworkGetEntityFromNetworkId(v.netId)
if DoesEntityExist(entity) then
if players > 0 then
if playersCount > 0 then
TriggerClientEvent('esx_lscustom:restoreMods', -1, v.netId, v.props)
else
DeleteEntity(entity)
@@ -92,4 +92,4 @@ ESX.RegisterServerCallback('esx_lscustom:getVehiclesPrices', function(source, cb
Vehicles = MySQL.query.await('SELECT model, price FROM vehicles')
end
cb(Vehicles)
end)
end)