
Anti-MC
By: a guest on
Jan 20th, 2012 | syntax:
Lua | size: 0.52 KB | hits: 127 | expires: Never
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
-- Script by J.Dre --
function onLogin(cid)
if(getPlayerGroupId(cid) < 2) then
if(not isInArray(allowedIP, doConvertIntegerToIp(getPlayerIp(cid)))) then
addEvent(antiMC, 150, {pid = cid, max = config.max + 1})
end
end
return true
end