disallow connection of a rockstar license that is already in the server

This commit is contained in:
Developer-Bear
2021-07-26 22:15:51 -05:00
parent 7e20d0bc36
commit 4400413233
2 changed files with 22 additions and 5 deletions
+16
View File
@@ -257,4 +257,20 @@ QBCore.Functions.IsPlayerBanned = function (source)
end
end)
return retval, message
end
QBCore.Functions.IsLicenseInUse = function(license)
local players = GetPlayers()
for _, player in pairs(players) do
local identifiers = GetPlayerIdentifiers(player)
for _, id in pairs(identifiers) do
if string.find(id, 'license') then
local playerLicense = id
if playerLicense == license then
return true
end
end
end
end
return false
end