hello i added this anti mc system to prevent players from using magebomb or nuking my server with acount manager and this is what i have :
it works perfectly and all i want to do now is to add this
i've tried adding it after addEvent and if i put it there then everyone gets the message when they log in, i also tried putting it after
but i get this error:
so where do i put it so that when the player logs in they get that message and then after four seconds they get kicked?
PHP:
local function antiMC(system)
if #getPlayersByIp(getPlayerIp(system.pid)) >= system.max then
doRemoveCreature(system.pid)
end
return TRUE
end
function onLogin(cid)
addEvent(antiMC, 4000, {pid = cid, max = 4})
return TRUE
end
PHP:
doPlayerPopupFYI(cid, "Multi-client will not be allowed in this server. You will now be kicked!")
Code:
if #getPlayersByIp(getPlayerIp(system.pid)) >= system.max then
Code:
[28/5/2015 17:58:47] [Error - CreatureScript Interface]
[28/5/2015 17:58:47] In a timer event called from:
[28/5/2015 17:58:47] data/creaturescripts/scripts/antimc.lua:onLogin
[28/5/2015 17:58:47] Description:
[28/5/2015 17:58:47] (LuaInterface::luaDoPlayerPopupFYI) Player not found