someone can help me?
i have this script
but i got this console error when i try use disconnect function
how solve this?
i have this script
Lua:
local config = {
number_max_ip = 1,
}
local white_list = {"000.000.000.000", "000.000.000.000"}
function onLogin(player)
if isInArray(white_list, Game.convertIpToString(player:getIp())) == false then
if #getPlayersByIPAddress(player:getIp()) > config.number_max_ip then
disconnect(player)
end
end
return true
end
but i got this console error when i try use disconnect function
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/mc.lua:onLogin
data/creaturescripts/scripts/mc.lua:11: attempt to call global 'disconnect' (a nil value)
how solve this?