Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(client): use lib.load and config documentation #116

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions qbx_disableservices/client.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
local config = lib.loadJson('qbx_disableservices.config')
local config = lib.load('qbx_disableservices.config')

CreateThread(function()
SetMaxWantedLevel(config.maxWantedLevel)
for key, value in ipairs(config.enabledServices) do
EnableDispatchService(key, value)
end

SetMaxWantedLevel(config.maxWantedLevel)
end)
end)
20 changes: 0 additions & 20 deletions qbx_disableservices/config.json

This file was deleted.

20 changes: 20 additions & 0 deletions qbx_disableservices/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return {
maxWantedLevel = 0,
enabledServices = {
[1] = false, -- PoliceAutomobile
[2] = false, -- PoliceHelicopter
[3] = false, -- FireDepartment
[4] = false, -- SwatAutomobile
[5] = false, -- AmbulanceDepartment
[6] = false, -- PoliceRiders
[7] = false, -- PoliceVehicleRequest
[8] = true, -- PoliceRoadBlock
[9] = false, -- PoliceAutomobileWaitPulledOver
[10] = false, -- PoliceAutomobileWaitCruising
[11] = false, -- Gangs
[12] = false, -- SwatHelicopter
[13] = false, -- PoliceBoat
[14] = false, -- ArmyVehicle
[15] = false -- BikerBackup
},
}