refactor: small optimization

This commit is contained in:
MoskalykA
2023-12-21 20:17:32 +01:00
parent b132f2963e
commit fb4cc3e113
4 changed files with 11 additions and 9 deletions
+2 -1
View File
@@ -306,8 +306,9 @@ end
QBCore.Functions.UpdateGang = UpdateGang
exports('UpdateGang', UpdateGang)
local resourceName = GetCurrentResourceName()
local function GetCoreVersion(InvokingResource)
local resourceVersion = GetResourceMetadata(GetCurrentResourceName(), 'version')
local resourceVersion = GetResourceMetadata(resourceName, 'version')
if InvokingResource and InvokingResource ~= '' then
print(('%s called qbcore version check: %s'):format(InvokingResource or 'Unknown Resource', resourceVersion))
end