mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +01:00
feat: convar for compatibility
This commit is contained in:
@@ -13,7 +13,8 @@ Config = {
|
|||||||
randomUnlockedVehicleChance = GetConvarInt("core:randomUnlockedVehicleChance", 30),
|
randomUnlockedVehicleChance = GetConvarInt("core:randomUnlockedVehicleChance", 30),
|
||||||
disableVehicleAirControl = GetConvarInt("core:disableVehicleAirControl", 1) == 1,
|
disableVehicleAirControl = GetConvarInt("core:disableVehicleAirControl", 1) == 1,
|
||||||
useInventoryForKeys = GetConvarInt("core:useInventoryForKeys", 1) == 1,
|
useInventoryForKeys = GetConvarInt("core:useInventoryForKeys", 1) == 1,
|
||||||
groups = json.decode(GetConvar("core:groups", "[]"))
|
groups = json.decode(GetConvar("core:groups", "[]")),
|
||||||
|
compatibility = json.decode(GetConvar("core:compatibility", "[]"))
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Discord rich presence.
|
-- Discord rich presence.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
if not lib.table.contains(Config.compatibility, "backwards") then return end
|
||||||
|
|
||||||
NDCore.Functions = {}
|
NDCore.Functions = {}
|
||||||
NDCore.Functions.GetSelectedCharacter = NDCore.getPlayer
|
NDCore.Functions.GetSelectedCharacter = NDCore.getPlayer
|
||||||
NDCore.Functions.GetCharacters = NDCore.getCharacters
|
NDCore.Functions.GetCharacters = NDCore.getCharacters
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
if not lib.table.contains(Config.compatibility, "backwards") then return end
|
||||||
|
|
||||||
exports("GetCoreObject", function()
|
exports("GetCoreObject", function()
|
||||||
return NDCore
|
return NDCore
|
||||||
end)
|
end)
|
||||||
|
|||||||
2
compatibility/esx/client.lua
Normal file
2
compatibility/esx/client.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
if not lib.table.contains(Config.compatibility, "esx") then return end
|
||||||
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
if not lib.table.contains(Config.compatibility, "esx") then return end
|
||||||
|
|
||||||
local itemNames
|
local itemNames
|
||||||
local registeredItems = {}
|
local registeredItems = {}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ Config = {
|
|||||||
groups = json.decode(GetConvar("core:groups", "[]")),
|
groups = json.decode(GetConvar("core:groups", "[]")),
|
||||||
admins = json.decode(GetConvar("core:admins", "[]")),
|
admins = json.decode(GetConvar("core:admins", "[]")),
|
||||||
adminDiscordRoles = json.decode(GetConvar("core:adminDiscordRoles", "[]")),
|
adminDiscordRoles = json.decode(GetConvar("core:adminDiscordRoles", "[]")),
|
||||||
multiCharacter = false
|
multiCharacter = false,
|
||||||
|
compatibility = json.decode(GetConvar("core:compatibility", "[]"))
|
||||||
}
|
}
|
||||||
|
|
||||||
SetConvarServerInfo("Discord", Config.discordInvite)
|
SetConvarServerInfo("Discord", Config.discordInvite)
|
||||||
|
|||||||
Reference in New Issue
Block a user