Zonet
Web Developer
Hello, this script is made by slawkens, but dont work.
The thing i want is that, a script checks players from same ip, if like 2 players from same ip logins in same seconds, then it returns FALSE, or doRemoveCreature(cid). Other peoples okay. But like only if players from same IP logins on same seconds, not more.
Yours,
Zonet.
LUA:
local config = {
loginDelay = 2, -- in seconds
onlyWithSameIP = "yes" -- will work for all players ("no"), or only check player with same IP? ("yes")
}
--DONT MODIFY
config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)
local m_lastLogin, m_lastIP = 0, 0
function onLogin(cid)
local timeNow, playerIP = os.time(), getPlayerIp(cid)
if(m_lastLogin + seconds >= timeNow and (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
return FALSE
end
m_lastIP = playerIP
m_lastLogin = timeNow
return TRUE
end
Yours,
Zonet.