mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
More + optimization
This commit is contained in:
@@ -1,58 +1,72 @@
|
||||
local activeSkillCheck = false
|
||||
local skillCheckFunc = {
|
||||
qb = {
|
||||
start = function(data)
|
||||
local Skillbar = exports["qb-minigames"]:Skillbar()
|
||||
if Skillbar then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
},
|
||||
ox = {
|
||||
start = function(data)
|
||||
local Skillbar = exports[OXLibExport]:skillCheck(
|
||||
{
|
||||
"easy",
|
||||
"easy",
|
||||
"easy"
|
||||
},
|
||||
{
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
})
|
||||
if Skillbar then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
},
|
||||
gta = {
|
||||
start = function(data)
|
||||
local Skillbar = exports.jim_bridge:skillCheck()
|
||||
if Skillbar then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
},
|
||||
lation = {
|
||||
start = function(data)
|
||||
local Skillbar = exports.lation_ui:skillCheck("",
|
||||
{
|
||||
"easy",
|
||||
"easy",
|
||||
"easy"
|
||||
},
|
||||
{
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
})
|
||||
if Skillbar then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
function skillCheck(data)
|
||||
local result = false
|
||||
|
||||
if Config.System.skillCheck == "qb" then
|
||||
local Skillbar = exports["qb-minigames"]:Skillbar()
|
||||
if Skillbar then
|
||||
result = true
|
||||
else
|
||||
result = false
|
||||
end
|
||||
|
||||
elseif Config.System.skillCheck == "ox" then
|
||||
local Skillbar = exports[OXLibExport]:skillCheck(
|
||||
{
|
||||
"easy",
|
||||
"easy",
|
||||
"easy"
|
||||
},
|
||||
{
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
})
|
||||
if Skillbar then
|
||||
result = true
|
||||
else
|
||||
result = false
|
||||
end
|
||||
elseif Config.System.skillCheck == "gta" then
|
||||
exports.jim_bridge:skillCheck()
|
||||
|
||||
elseif Config.System.skillCheck == "lation" then
|
||||
local Skillbar = exports.lation_ui:skillCheck("",
|
||||
{
|
||||
"easy",
|
||||
"easy",
|
||||
"easy"
|
||||
},
|
||||
{
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
})
|
||||
|
||||
if Skillbar then
|
||||
result = true
|
||||
else
|
||||
result = false
|
||||
end
|
||||
else
|
||||
result = true
|
||||
if Config.System.skillCheck then
|
||||
return skillCheckFunc[Config.System.skillCheck].start(data)
|
||||
end
|
||||
return result
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user