mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +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(0, 75, true) -- Disable exit vehicle
|
||||||
DisableControlAction(27, 75, true) -- Disable exit vehicle
|
DisableControlAction(27, 75, true) -- Disable exit vehicle
|
||||||
end
|
end
|
||||||
Wait(0)
|
Wait(Sleep)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ AddEventHandler('esx:playerDropped', function(src)
|
|||||||
for k,v in pairs(Customs[src]) do
|
for k,v in pairs(Customs[src]) do
|
||||||
local entity = NetworkGetEntityFromNetworkId(v.netId)
|
local entity = NetworkGetEntityFromNetworkId(v.netId)
|
||||||
if DoesEntityExist(entity) then
|
if DoesEntityExist(entity) then
|
||||||
if players > 0 then
|
if playersCount > 0 then
|
||||||
TriggerClientEvent('esx_lscustom:restoreMods', -1, v.netId, v.props)
|
TriggerClientEvent('esx_lscustom:restoreMods', -1, v.netId, v.props)
|
||||||
else
|
else
|
||||||
DeleteEntity(entity)
|
DeleteEntity(entity)
|
||||||
@@ -92,4 +92,4 @@ ESX.RegisterServerCallback('esx_lscustom:getVehiclesPrices', function(source, cb
|
|||||||
Vehicles = MySQL.query.await('SELECT model, price FROM vehicles')
|
Vehicles = MySQL.query.await('SELECT model, price FROM vehicles')
|
||||||
end
|
end
|
||||||
cb(Vehicles)
|
cb(Vehicles)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user