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

Script Error

sequera98

New Member
Joined
Mar 13, 2017
Messages
3
Reaction score
0
Help with this script, I want the domains to open the portals with the lever. The error is that all players can open without having the domain please...

local gatepos = {x=194, y=91, z=15, stackpos=1} --posição do primeiro portão
local g = 1544 --id do primeiro portão
local g2 = 1544 --id do segundo portão
local g3 = 1544 --id do terceiro portão
local doorOpen = "The door has been opened!"
local doorClose = "The door has been closed!"
local guildname = 1
function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) >= guildname then
local item = getTileItemById(gatepos, g)
if item.uid > 0 then
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 22, doorOpen)
else
doCreateItem(g, 1, gatepos)
doPlayerSendTextMessage(cid, 22, doorClose)
end
end
return true
end
 
Back
Top