• 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 Dont attack player with same ip

lostenhoz

New Member
Joined
Aug 31, 2020
Messages
29
Reaction score
0
hello, is possible add to dont attack and damage player with same ip?

i have this for same guild
Lua:
function onCombat(cid, target)
    if getTileInfo(getThingPos (cid)). pvp then return true end
    if isPlayer(target) and getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == getPlayerGuildId(target) then
        doPlayerSendCancel(cid, "Não pode atacar players da mesma guild.")
        return false
    end
    return true
end

tfs 0.4 3777
 
Lua:
function onCombat(cid, target)
    if getTileInfo(getThingPos (cid)). pvp then return true end
    if isPlayer(target) then
        if getPlayerIp(cid) ~= getPlayerIp(target) then
            if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == getPlayerGuildId(target) then
                doPlayerSendCancel(cid, "Não pode atacar players da mesma guild.")
                return false
            end
        else
            doPlayerSendCancel(cid, "Não pode atacar players com mesmo IP.")
            return false
        end
    end
    return true
end
 
Back
Top