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

Solved How to add a orange text ingame with this script?

Elwthz

Member
Joined
Jun 5, 2015
Messages
72
Reaction score
5
Hello, I'm using this anti-mc script for my tfs (last commit)

When the player tries to login with the 3rd account (limit i've set is 2) it appears for a frame of second and logout right after the login effect... I'd like to make it send a text ingame on orange words like "Anti-MC"

I tried but i don't really know between which line i have to set it :p

Here's the code:

Code:
local AccPorIp = 2

function onLogin(player) 

    local mc = 0
    for _, verificar in ipairs(Game.getPlayers()) do
        if player:getIp() == verificar:getIp() then
            mc = mc + 1
            if mc > AccPorIp then return false end
        end
    end

    return true
end
 
Hello, I'm using this anti-mc script for my tfs (last commit)

When the player tries to login with the 3rd account (limit i've set is 2) it appears for a frame of second and logout right after the login effect... I'd like to make it send a text ingame on orange words like "Anti-MC"

I tried but i don't really know between which line i have to set it :p

Here's the code:

Code:
local AccPorIp = 2

function onLogin(player)

    local mc = 0
    for _, verificar in ipairs(Game.getPlayers()) do
        if player:getIp() == verificar:getIp() then
            mc = mc + 1
            if mc > AccPorIp then return false end
        end
    end

    return true
end
TFS?
 
I'm not xxproscripterxx but try to add this somewhere in the script
Code:
MESSAGE_STATUS_CONSOLE_ORANGE
 
Code:
local AccPorIp = 2

function onLogin(player)

local mc = 0
for _, verificar in ipairs(Game.getPlayers()) do
if player:getIp() == verificar:getIp() then
mc = mc + 1
player:say("Anti-MC", TALKTYPE_MONSTER_SAY)
if mc > AccPorIp then return false end
end
end

return true
end

Credit: A special person.

I have no idea if this will work, but i wont be here for another 4 hours.
 
It works, but send the message twice when normal login and send it 3 times if tries to loging after the limit xD
I'll see what i can do with that

Thanks!
 
Code:
local AccountPerIp = 2

function onLogin(player)
    local mc = 0
    for _, duplicate in ipairs(Game.getPlayers()) do
        if player:getIp() == duplicate:getIp() then
            mc = mc + 1
        end
    end
    if mc > AccountPerIp then
        player:say("Anti-MC", TALKTYPE_MONSTER_SAY)
        return false
    end
    return true
end
 
Back
Top