Files
Elite-Gaming-FiveM/resources/RageUI/components/Keys.lua
T
Jacob 775709ddef New Improvements & Bug Fixes
+ Added new Wheel-Damage script which causes wheels to fly off if the car is hit hard.
+ Added newer version of the police siren LVC menu.
+ Changed a bunch of keybinds in order to facilitate FivePD.
+ Readded the accidentally removed emote menu and removed NoDriveBy.
+ Updated the server theme alittle away from just RP.
+ Updated to server artifacts version to 6372
2023-04-02 20:38:32 +01:00

45 lines
1.0 KiB
Lua

---
--- @author Dylan MALANDAIN
--- @version 2.0.0
--- @since 2020
---
--- RageUI Is Advanced UI Libs in LUA for make beautiful interface like RockStar GAME.
---
---
--- Commercial Info.
--- Any use for commercial purposes is strictly prohibited and will be punished.
---
--- @see RageUI
---
---@class Keys
Keys = {};
---Register
---@param Controls string
---@param ControlName string
---@param Description string
---@param Action function
---@return Keys
---@public
function Keys.Register(Controls, ControlName, Description, Action)
local _Keys = {
CONTROLS = Controls
}
RegisterKeyMapping(string.format('rageui-%s', ControlName), Description, "keyboard", Controls)
RegisterCommand(string.format('rageui-%s', ControlName), function(source, args)
if (Action ~= nil) then
Action();
end
end, false)
return setmetatable(_Keys, Keys)
end
---Exists
---@param Controls string
---@return boolean
function Keys:Exists(Controls)
return self.CONTROLS == Controls and true or false
end