• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Check door in proctetion zone tfs 1.2

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks! What is the function that I can use to check if the door is under proctetion zone if so then will return false.

Thanks.
 
@Xikini

Still facing it, I don't know what suppost to use to check if the port that the player is using is under protection zone. :p :p
I got something like this, dunno.

Code:
if isInArray(openSpecialDoors, targetId) or isInArray(questDoors, targetId) or isInArray(levelDoors, targetId) then
            if ???:hasFlag(TILESTATE_PROTECTIONZONE) then
                player:sendCancelMessage("You can't do it.")
                return false
            end
        end
 
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)

toPosition is defined as the doors position either way as long as it uses an onUse script, which it does in your doors.lua :)

Code:
if (getTilePzInfo(toPosition) == true) then
return false
end
 
Back
Top