Merge pull request #1073 from GLN123/patch-2

Blocking the same character from entering the server
This commit is contained in:
Gellipapa
2023-06-21 19:09:50 +02:00
committed by GitHub
@@ -214,6 +214,14 @@ end
if isNew then
awaitingRegistration[source] = charid
else
if not ESX.GetConfig().EnableDebug then
local identifier = PREFIX..charid .. ':' .. GetIdentifier(source)
if ESX.GetPlayerFromIdentifier(identifier) then
DropPlayer(source, 'Your identifier '..identifier..' is already on the server!')
return
end
end
TriggerEvent('esx:onPlayerJoined', source, PREFIX..charid)
ESX.Players[GetIdentifier(source)] = true
end