• 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 teleport how to make? tfs 1.x

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
46
Hi, how to make anti-mc teleport? I want make area, what be opened only in X:X:X date X:X hour, but i want blockade for mc, only one player per IP can join.

(btw, its another question, someone know how to check what a tfs im using? Cuz im stop worked on my datapack few month ago, but im smoking weed to much and my memory is so bad, and i forgotte what im use, tfs 1.3 or 1.5)
 
Solution
Add in ur globalevent script this function:

Lua:
local ilemozna = 2 -- how many ip is legal / na ile charow z 1 ip mozna logowac
function onLogin(player)

    local mc = 0
    for _, check in ipairs(Game.getPlayers()) do
        if player:getIp() == check:getIp() and not player:isVip() then
            mc = mc + 1
            if mc > ilemozna then
                return false
            end
        end
    end

    return true
end
u can add it in ur event.. you don't have to do this in "function onLogin(player)"
Add in ur globalevent script this function:

Lua:
local ilemozna = 2 -- how many ip is legal / na ile charow z 1 ip mozna logowac
function onLogin(player)

    local mc = 0
    for _, check in ipairs(Game.getPlayers()) do
        if player:getIp() == check:getIp() and not player:isVip() then
            mc = mc + 1
            if mc > ilemozna then
                return false
            end
        end
    end

    return true
end
u can add it in ur event.. you don't have to do this in "function onLogin(player)"
 
Solution
Back
Top