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

Exhale19

Hi Guys. Im searching pvp protection script, which players with for example 50-149, can not attack players with 150+. I've got something like that, but it doesn't work. Do you have any idea^^?

local stages = {
{ from = 50, to = 149 },
{ from = 150, to = 350},
{ from = 350, to = 999}

}

function onCombat(cid, target)
local level = getPlayerLevel(cid)
if isPlayer(target) == TRUE then
local target_level = getPlayerLevel(target)
for i = 1, #stages do
if level >= stages.from and level <= stages.to then
if target_level >= stages.from and target_level <= stages.to then
return TRUE
else
doPlayerSendCancel(cid, "You are not allowed to attack this Player.")
end
end
end
Birthday
Jan 21, 1997 (Age: 29)
Gender
Male

Trophies

  1. 1

    First Message

    Post a message somewhere on the site to receive this.
Back
Top