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

Anty MC

Ific

New Member
Joined
Apr 14, 2009
Messages
209
Reaction score
0
Location
My Paradise
Hello, I want to add the Anty MC system in my server, that is possible? :huh:

How I can do it?



Repp++
 
Nope, in login.lua :thumbup:
Can't you see it has function onLogin(cid)

Easier to just create a new one:

Go to /data/creaturescripts/scripts/
Add a new .lua called gtfoMC.lua
Insert:
Code:
local function gtfoMC(p)
    if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then
        doRemoveCreature(p.pid)
    end
        return TRUE
end

function onLogin(cid)
    addEvent(gtfoMC, 1000, {pid = cid, max = 4})
    return TRUE
end
Then go to /data/creaturescripts/ and open creaturescripts.xml
Add:
Code:
	<event type="login" name="gtfoMC" event="script" value="gtfoMC.lua"/>

That way you don't need to mess up login.lua or start editing it to combine several scripts.

Must more systematic to do it this way.
 
Back
Top