mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
fix Inservice bug + add playerDropped event
This commit is contained in:
+9
-1
@@ -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)
|
||||
Reference in New Issue
Block a user