From 5797ea37ce4b27d752b949ed2557c636c75a36dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sun, 13 Aug 2017 22:39:05 +0200 Subject: [PATCH] Fix source --- server/main.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)