mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
fixes(service+police): Police can properly go on duty; remove player from service when dropping
This commit is contained in:
@@ -115,7 +115,7 @@ function OpenCloakroomMenu()
|
||||
ESX.TriggerServerCallback('esx_service:isInService', function(isInService)
|
||||
if not isInService then
|
||||
|
||||
if Config.MaxInService == -1 then
|
||||
if Config.MaxInService ~= -1 then
|
||||
ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount)
|
||||
if not canTakeService then
|
||||
ESX.ShowNotification(_U('service_max', inServiceCount, maxInService))
|
||||
|
||||
@@ -5,7 +5,7 @@ Config.MarkerType = {Cloakrooms = 20, Armories = 21, BossActions
|
||||
Config.MarkerSize = {x = 1.5, y = 1.5, z = 0.5}
|
||||
Config.MarkerColor = {r = 50, g = 50, b = 204}
|
||||
|
||||
Config.EnablePlayerManagement = false -- Enable if you want society managing.
|
||||
Config.EnablePlayerManagement = true -- Enable if you want society managing.
|
||||
Config.EnableArmoryManagement = false
|
||||
Config.EnableESXIdentity = true -- Enable if you're using esx_identity.
|
||||
Config.EnableLicenses = false -- Enable if you're using esx_license.
|
||||
@@ -17,7 +17,7 @@ Config.EnableJobBlip = false -- Enable blips for cops on duty, requ
|
||||
Config.EnableCustomPeds = false -- Enable custom peds in cloak room? See Config.CustomPeds below to customize peds.
|
||||
|
||||
Config.EnableESXService = false -- Enable esx service?
|
||||
Config.MaxInService = -1 -- How much people can be in service at once?
|
||||
Config.MaxInService = -1 -- How many people can be in service at once? Set as -1 to have no limit
|
||||
|
||||
Config.Locale = 'en'
|
||||
|
||||
|
||||
@@ -73,9 +73,7 @@ ESX.RegisterServerCallback('esx_service:getInServiceList', function(source, cb,
|
||||
cb(InService[name])
|
||||
end)
|
||||
|
||||
AddEventHandler('playerDropped', function()
|
||||
local _source = source
|
||||
|
||||
AddEventHandler('esx:playerDropped', function(playerId, reason)
|
||||
for k,v in pairs(InService) do
|
||||
if v[_source] == true then
|
||||
v[_source] = nil
|
||||
|
||||
Reference in New Issue
Block a user