mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
Merge pull request #1851 from seltonmt012/fix/esx-lib-uint-and-interactions
fix(esx_lib): make the uint check work and remove an unread table
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
xLib.interactions = {}
|
||||
|
||||
local interactions = {}
|
||||
local pressedInteractions = {}
|
||||
|
||||
---@param name string
|
||||
function xLib.interactions.remove(name)
|
||||
@@ -36,7 +35,6 @@ xLib.addKeybind({
|
||||
for _, interaction in pairs(interactions) do
|
||||
local success, result = pcall(interaction.condition)
|
||||
if success and result then
|
||||
pressedInteractions[#pressedInteractions + 1] = interaction
|
||||
interaction.onPress()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,7 +81,7 @@ local function verifyType(value, valid_type)
|
||||
elseif valid_type == 'float' then
|
||||
return math.type(value) == 'float'
|
||||
elseif valid_type == 'uint' then
|
||||
return math.type(value) == 'int' and value >= 0
|
||||
return math.type(value) == 'integer' and value >= 0
|
||||
elseif valid_type == 'char' then
|
||||
return type(value) == 'string' and #value == 1
|
||||
elseif valid_type == 'ped' then
|
||||
|
||||
Reference in New Issue
Block a user