feat (server/exports): Added GetCoreVersion to return the manifest version of the core.

This commit is contained in:
Idris Dev
2022-02-15 13:51:35 +11:00
committed by GitHub
parent df64b17aa3
commit efd28061e4
+11 -1
View File
@@ -141,4 +141,14 @@ local function AddGangs(gangs)
return true, message, nil
end
QBCore.Functions.AddGangs = AddGangs
exports('AddGangs', AddGangs)
exports('AddGangs', AddGangs)
local function GetCoreVersion(InvokingResource)
local resourceVersion = GetResourceMetadata(GetCurrentResourceName(), 'version')
if InvokingResource ~= nil then
print( ("%s called qbcore version check: %s"):format(InvokingResource, resourceVersion) )
end
return resourceVersion
end
QBCore.Functions.GetCoreVersion = GetCoreVersion
exports('GetCoreVersion', GetCoreVersion)