fix Inservice bug + add playerDropped event

This commit is contained in:
Jérémie N'gadi
2017-08-08 19:12:38 +02:00
parent b0f878f5bb
commit 5459372a36
+9 -1
View File
@@ -34,10 +34,18 @@ ESX.RegisterServerCallback('esx_service:enableService', function(source, cb, nam
if inServiceCount >= MaxInService[name] then
cb(false, MaxInService[name], inServiceCount)
else
InService[name][source] = enable
InService[name][source] = true
cb(true, MaxInService[name], inServiceCount)
end
end)
AddEventHandler('playerDropped', function(source)
for k,v in pairs(InService) do
if v[source] == true then
v[source] = nil
end
end
end)