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

Lua Check Multiclient

ZeroSkyer

Member
Joined
May 17, 2019
Messages
62
Reaction score
9
Location
EEUU
Hi friends. This code is from another user here from Otland. It does not allow you to attack other characters with 2 characters. What I'm looking for is that it allows you to attack with only 2 characters.

Code:
Lua:
if self and target then 
        if self:isPlayer() and target:isPlayer() then
            local playersByIp = Game.getPlayersByIPAddress(self:getIp())
            if #playersByIp > 1 then
                for i = 1, #playersByIp do
                    if playersByIp[i] ~= self and playersByIp[i]:getTarget() == target then
                        return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
                    end
                end
            end
        end
    end
 
Back
Top