Skip to content

Commit

Permalink
v3.2.9 Stable Push
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBarns committed Oct 1, 2022
1 parent 254dcf4 commit 26f534d
Show file tree
Hide file tree
Showing 47 changed files with 3,755 additions and 1,617 deletions.
116 changes: 65 additions & 51 deletions PLUGINS/cl_plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,69 +10,83 @@ FILE: cl_plugins.lua
PURPOSE: Builds RageUI Plugin Menu based on plugins
settings. Handles Plugin -> LVC event communication
---------------------------------------------------
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 <https://www.gnu.org/licenses/>.
---------------------------------------------------
]]
-- RAGE UI
-- Draws specific button with callback to plugins menu if the plugin is found and enabled. (controlled in plugins settings file)
Citizen.CreateThread(function()
while plugins_installed do
RageUI.IsVisible(RMenu:Get('lvc', 'plugins'), function()
-----------------------------------------------------------------------------------------------------------------
if smart_siren_masterswitch then
RageUI.Button('Smart Siren Settings', "Open smart siren settings menu. (smart_sirens)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'smartsiren'))
end
-----------------------------------------------------------------------------------------------------------------
if tkd_masterswitch then
RageUI.Button('Takedown Settings', "Open takedown lights menu. (takedowns)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'tkdsettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ei_masterswitch then
RageUI.Button('Extra Integration Settings', "Open extra integration menu. (extra_integration)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'extrasettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ta_masterswitch then
RageUI.Button('Traffic Advisor Settings', "Open traffic advisor menu. (traffic_advisor)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'tasettings'))
end
-----------------------------------------------------------------------------------------------------------------
if trailer_masterswitch then
RageUI.Button('Trailer Support Settings', "Open trailer support settings menu. (trailer_support)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'trailersettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ec_masterswitch then
RageUI.Button('Extra Controls Settings', "Open extra controls settings menu. (extra_controls)", {RightLabel = "→→→"}, true, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'extracontrols'))
end
-----------------------------------------------------------------------------------------------------------------
end)
Citizen.Wait(0)
CreateThread(function()
while true do
while plugins_installed and IsMenuOpen() do
RageUI.IsVisible(RMenu:Get('lvc', 'plugins'), function()
-----------------------------------------------------------------------------------------------------------------
if tkd_masterswitch ~= nil then
RageUI.Button(Lang:t('plugins.menu_tkd'), Lang:t('plugins.menu_tkd_desc'), {RightLabel = '→→→'}, tkd_masterswitch, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'tkdsettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ei_masterswitch ~= nil then
RageUI.Button(Lang:t('plugins.menu_ei'), Lang:t('plugins.menu_ei_desc'), {RightLabel = '→→→'}, ei_masterswitch, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'extrasettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ta_masterswitch ~= nil then
RageUI.Button(Lang:t('plugins.menu_ta'), Lang:t('plugins.menu_ta_desc'), {RightLabel = '→→→'}, ta_masterswitch, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'tasettings'))
end
-----------------------------------------------------------------------------------------------------------------
if trailer_masterswitch ~= nil then
RageUI.Button(Lang:t('plugins.menu_ts'), Lang:t('plugins.menu_ts_desc'), {RightLabel = '→→→'}, trailer_masterswitch, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'trailersettings'))
end
-----------------------------------------------------------------------------------------------------------------
if ec_masterswitch ~= nil then
RageUI.Button(Lang:t('plugins.menu_ec'), Lang:t('plugins.menu_ec_desc'), {RightLabel = '→→→'}, ec_masterswitch, {
onSelected = function()
end,
}, RMenu:Get('lvc', 'extracontrols'))
end
-----------------------------------------------------------------------------------------------------------------
end)
Wait(0)
end
Wait(500)
end
end)

-- FUNCTIONS
-- IsPluginMenuOpen is called inside IsMenuOpen (LVC/UI/cl_ragemenu.lua) to separate them, this is useful for plugin updates separate of main LVC updates.
local ec_shortcut_menu_visible = false
function IsPluginMenuOpen()
return RageUI.Visible(RMenu:Get('lvc', 'smartsiren')) or
RageUI.Visible(RMenu:Get('lvc', 'tkdsettings')) or
if ec_masterswitch then
ec_shortcut_menu_visible = EC.is_menu_open
end

return RageUI.Visible(RMenu:Get('lvc', 'tkdsettings')) or
RageUI.Visible(RMenu:Get('lvc', 'extrasettings')) or
RageUI.Visible(RMenu:Get('lvc', 'tasettings')) or
RageUI.Visible(RMenu:Get('lvc', 'trailersettings')) or
RageUI.Visible(RMenu:Get('lvc', 'trailerextras')) or
RageUI.Visible(RMenu:Get('lvc', 'trailerdoors')) or
RageUI.Visible(RMenu:Get('lvc', 'extracontrols'))
RageUI.Visible(RMenu:Get('lvc', 'extracontrols')) or
ec_shortcut_menu_visible
end
21 changes: 21 additions & 0 deletions PLUGINS/extra_controls/SETTINGS.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--------------------EXTRA INTEGRATION SETTINGS---------------------
ec_masterswitch = false
-- Determines if extra_integration plugin can be activated.
allow_custom_controls = true
-- Enabled/Disables menu which allows for custom controls to be set.
--[[ Documentation / Wiki: https://github.com/TrevorBarns/luxart-vehicle-control/wiki/Extra-Controls ]]

EXTRA_CONTROLS = {
['DEFAULT'] = {
-- { '<name>', Extras = {<extras table>}, Combo = <default combo>, Key = <default key>, (opt.) Audio = < button soundFX> }
},
}

CONTROLS = {
-- COMBOS = { <list of index/key ID of approved combo-keys> }, List of Controls: https://docs.fivem.net/docs/game-references/controls/
-- KEYS = { <list of index/key ID of approved toggle keys> }
-- ex: COMBOS = { 326, 155, 19, 349 }, --LCTRL, LSHIFT, LALT, TAB
-- ex: KEYS = { 187, 188, 189, 190, 20 }, -- ARROW LFT, DWN, UP, RGT, Z
COMBOS = { },
KEYS = { }
}
Loading

0 comments on commit 26f534d

Please sign in to comment.