local kickPlayers = true
local whitelist = {
'127.0.0.1',
}
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and not isInArray(whitelist, doConvertIntegerToIp(getPlayerIp(cid))) and #getPlayersByIp(getPlayerIp(cid)) > 3 then
doPlayerPopupFYI(cid, 'You cannot establish more than 2 connections from the same IP address.')
if kickPlayers then
local k = getPlayersByIp(getPlayerIp(cid))
for i = 1, #k do
if not hasCondition(k[i], CONDITION_INFIGHT) and getCreatureSkullType(k[i]) ~= SKULL_WHITE then
doRemoveCreature(k[i])
end
end
end
return false
end
return true
end