Only show esx_license menu if enabled in config

This commit is contained in:
ElPumpo
2018-04-14 13:29:03 +02:00
parent 330a024f9e
commit b5be66d486
2 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -29,4 +29,4 @@ start esx_policejob
```
5) * If you want player management you have to set Config.EnablePlayerManagement to true in config.lua
* If you want armory management you have to set Config.EnableArmoryManagement to true in config.lua
* If you want license management you have to set Config.EnableLicenses to true in config.lua
+16 -11
View File
@@ -448,22 +448,27 @@ function OpenPoliceActionsMenu()
function(data, menu)
if data.current.value == 'citizen_interaction' then
local elements = {
{label = _U('id_card'), value = 'identity_card'},
{label = _U('search'), value = 'body_search'},
{label = _U('handcuff'), value = 'handcuff'},
{label = _U('drag'), value = 'drag'},
{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
{label = _U('fine'), value = 'fine'},
{label = _U('license_check'), value = 'license'}
}
if Config.EnableLicenses then
table.insert(elements, { label = _U('license_check'), value = 'license' })
end
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'citizen_interaction',
{
title = _U('citizen_interaction'),
align = 'top-left',
elements = {
{label = _U('id_card'), value = 'identity_card'},
{label = _U('search'), value = 'body_search'},
{label = _U('handcuff'), value = 'handcuff'},
{label = _U('drag'), value = 'drag'},
{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
{label = _U('fine'), value = 'fine'},
{label = _U('license_check'), value = 'license'}
},
elements = elements
},
function(data2, menu2)