• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Anty-MC teleport how to make? tfs 1.x

vexler222

Active Member
Joined
Apr 22, 2012
Messages
715
Solutions
15
Reaction score
47
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)"

Svira

Member
Joined
Jan 27, 2008
Messages
199
Solutions
7
Reaction score
20
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
Top