diff --git a/server/main.lua b/server/main.lua index 1828d4a1..0c5ac3f9 100644 --- a/server/main.lua +++ b/server/main.lua @@ -40,12 +40,14 @@ ESX.RegisterServerCallback('esx_service:enableService', function(source, cb, nam end) -AddEventHandler('playerDropped', function(source) +AddEventHandler('playerDropped', function() + local _source = source + for k,v in pairs(InService) do - if v[source] == true then - v[source] = nil + if v[_source] == true then + v[_source] = nil end end -end) \ No newline at end of file +end)