mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
feat: convar for compatibility
This commit is contained in:
@@ -13,7 +13,8 @@ Config = {
|
||||
randomUnlockedVehicleChance = GetConvarInt("core:randomUnlockedVehicleChance", 30),
|
||||
disableVehicleAirControl = GetConvarInt("core:disableVehicleAirControl", 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
if not lib.table.contains(Config.compatibility, "backwards") then return end
|
||||
|
||||
NDCore.Functions = {}
|
||||
NDCore.Functions.GetSelectedCharacter = NDCore.getPlayer
|
||||
NDCore.Functions.GetCharacters = NDCore.getCharacters
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
if not lib.table.contains(Config.compatibility, "backwards") then return end
|
||||
|
||||
exports("GetCoreObject", function()
|
||||
return NDCore
|
||||
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 registeredItems = {}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ Config = {
|
||||
groups = json.decode(GetConvar("core:groups", "[]")),
|
||||
admins = json.decode(GetConvar("core:admins", "[]")),
|
||||
adminDiscordRoles = json.decode(GetConvar("core:adminDiscordRoles", "[]")),
|
||||
multiCharacter = false
|
||||
multiCharacter = false,
|
||||
compatibility = json.decode(GetConvar("core:compatibility", "[]"))
|
||||
}
|
||||
|
||||
SetConvarServerInfo("Discord", Config.discordInvite)
|
||||
|
||||
Reference in New Issue
Block a user