• 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!

Ant Mc

51e07640-5473-4a8f-aad9-c6aae73e8844.jpg
 
You don't need any 'C++' edits to make this work.

data/creaturescripts/scripts/anti-mc.lua
Lua:
local config = {
	max = 1, -- How many should be allowed? [1 = default]
	allowedIP = {"127.0.0.1", "another IP"} -- People with this IP will be able to MC.
}

local function antiMC(p)
	if(#getPlayersByIp(getPlayerIp(p.pid)) >= p.max) then
		doRemoveCreature(p.pid)
	end
end

function onLogin(cid)
	if(getPlayerGroupId(cid) < 2) then
		if(not isInArray(allowedIP, doConvertIntegerToIp(getPlayerIp(cid)))) then
			addEvent(antiMC, 200, {pid = cid, max = config.max + 1})
		end
	end
	return true
end
 
Back
Top