mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Only show esx_license menu if enabled in config
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user