Using fvm
fvm install --save --folder=esx esx-frameworkg/esx_service
cd resources
git clone https://github.com/esx-framework/esx_service [esx]/esx_service
- Download https://github.com/esx-framework/esx_service/archive/master.zip
- Put it in the
[esx]
directory
- Add this to your
server.cfg
:
start esx_service
-- Enable service
ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount)
if canTakeService then
ESX.ShowNotification('You enabled service')
else
ESX.ShowNotification('Service is full: ' .. inServiceCount .. '/' .. maxInService)
end
end, 'taxi')
-- Disable service
TriggerServerEvent('esx_service:disableService', 'taxi')
esx_service - be in service
Copyright (C) 2015-2023 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.