metiu11
Member
- Joined
- Mar 26, 2011
- Messages
- 94
- Solutions
- 2
- Reaction score
- 5
Heyo again TFS 0.3.6
I found script like this - anti MC
It works but this script kicked player when he log MC and freeze server like 1-2 sec.
Do you have an idea how to block login and send information to the player in the client when choosing a character?
I am pretty sure to just change "doRemoveCreature(p.pid)" in another but i dont know what function can do that...
I found script like this - anti MC
It works but this script kicked player when he log MC and freeze server like 1-2 sec.
Do you have an idea how to block login and send information to the player in the client when choosing a character?
I am pretty sure to just change "doRemoveCreature(p.pid)" in another but i dont know what function can do that...
Code:
local config = {
max = 1,
text = "Multi-Client or Magebomb is not allowed.",
group_id = 1 -- it will only kick player whit that id (1=Players, 2=tutor, 3=seniortutors, 4=Gm's, 5=Cm's and 6=God's
}
local accepted_ip_list = "" -- here put the Ips you want to be allowed to use Mc/Magebomb..
local function antiMC(p)
if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then
doRemoveCreature(p.pid)
end
return TRUE
end
function onLogin(cid)
if getPlayerGroupId(cid) <= config.group_id then
if isInArray(accepted_ip_list,getPlayerIp(cid)) == FALSE then
addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
doPlayerPopupFYI(cid, config.text)
end
end
return TRUE
end