• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to disable MC?

Maybe something like this:
In init.lua
if g_platform.isProcessRunning("name") then
g_logger.fatal('mc')
end

Or check luafunctions.cpp there is more such functions that you looking for.
 
Code:
local AccPorIp = 5

function onLogin(player)

    local mc = 0
    for _, verificar in ipairs(Game.getPlayers()) do
        if player:getIp() == verificar:getIp() then
            mc = mc + 1
            if mc > AccPorIp then return false end
        end
    end

    return true
end

You can use this script to set a max connection per ip. I wouldnt make it lower than 4 as sometimes theres 3-4 guys living together who all want to play.

Enjoy :)
 
Maybe something like this:
In init.lua
if g_platform.isProcessRunning("name") then
g_logger.fatal('mc')
end

Or check luafunctions.cpp there is more such functions that you looking for.

Hey, it works but there is one thing, it shuts down the Client at start (without MC)
I mean the g_platform.isProcessRunning checks if proccess is running while you open the Client, is there any other option?

Code:
local AccPorIp = 5

function onLogin(player)

    local mc = 0
    for _, verificar in ipairs(Game.getPlayers()) do
        if player:getIp() == verificar:getIp() then
            mc = mc + 1
            if mc > AccPorIp then return false end
        end
    end

    return true
end

You can use this script to set a max connection per ip. I wouldnt make it lower than 4 as sometimes theres 3-4 guys living together who all want to play.

Enjoy :)

Thanks, but I am looking for the solution to Client, rather than in the game.
 
Last edited:
Hey, it works but there is one thing, it shuts down the Client at start (without MC)
I mean the g_platform.isProcessRunning checks if proccess is running while you open the Client, is there any other option?
i checked out over g_platform and i don't found anything that can make it, you should create a new cpp function, are you using windows or unix?
 
Use g_platform.getProcessId and compare it. You might need a new function like g_platform.getCurrentProcessId()
 
Back
Top