Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
I wanted to give only the player with the key acces to the area, but once the door is opened it doesn't close so everyone can still enter.. How can I help that?
local function onCloseDoor(id, pos)
if getTileItemById(pos, id).uid > 0 then
doTransformItem(getTileItemById(pos, id).uid, id -1)
end
end
addEvent(onCloseDoor, 10 * 1000, doors[item.itemid], toPosition)
I gave the door the same AID as the key's AID, I didn't use a script..
And then I gave the door the same UID as your script, and then it gives the error message I showed you.
I searched in the server a bit and i guess this is the script wich makes the door open with the key?
Still don't know how to edit it though.. soz.
Code:
if(isInArray(keys, item.itemid)) then
if(itemEx.actionid > 0) then
if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
doTransformItem(itemEx.uid, doors[itemEx.itemid])
return true
end
doPlayerSendCancel(cid, "The key does not match.")
return true
end
return false
end