local config = {
seconds = 2, -- in seconds
onlyWithSameIP = "yes" -- will work for all players ("no"), or only check player with same IP? ("yes")
logPlayerName = "yes"
}
--DONT MODIFY
config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)
config.logPlayerName = getBooleanFromString(config.logPlayerName)
local m_lastLogin, m_lastIP = 0, 0
function onLogin(cid)
local timeNow, playerIP, playerName = os.time(), getPlayerIp(cid), getPlayerName(cid)
if(m_lastLogin + config.seconds >= timeNow and (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
if config.logPlayerName == TRUE then
doWriteLogFile("multiIp.txt", .. playerName" ; \n")
end
return FALSE
end
m_lastIP = playerIP
m_lastLogin = timeNow
return TRUE
end