mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 16:23:21 +00:00
disallow connection of a rockstar license that is already in the server
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user