AddEventHandler("playerConnecting", function(name, reason, deffer)
local _src = source
local ip = GetPlayerEndpoint(_src)
local steam = GetPlayerIdentifierFromType("steam", _src)
deffer.defer()
deffer.update("Ensuring youre not already connected")
for _,pid in ipairs(GetPlayers()) do
local newSteam = GetPlayerIdentifierFromType("steam", pid)
local newIp = GetPlayerEndpoint(_src)
if newSteam == steam or newIp == ip then
deffer.done("You can only be in this server on 1 client")
end
end
end)
-- https://forum.cfx.re/t/solved-is-there-a-better-way-to-get-lic-steam-and-ip-than-getplayeridentifiers/236243/2?u=bitterfuck
function GetPlayerIdentifierFromType(type, source)
local identifiers = {}
local identifierCount = GetNumPlayerIdentifiers(source)
for a = 0, identifierCount do
table.insert(identifiers, GetPlayerIdentifier(source, a))
end
for b = 1, #identifiers do
if string.find(identifiers[b], type, 1) then
return identifiers[b]
end
end
return nil
end
the price is like free as you can see. so if you have enough knowledge to do this you dont need to buy it. i made this because some server owners are dont have enough knowledge and why not
i used translate for understand your reply so if i misunderstand sorry for that