mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Merge pull request #671 from iSentrie/patch-6
fix(esx_lscustom): fixes loop and players count
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user