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

Lua Help on installing the Vip Door script

DimaRom

New Member
Joined
Feb 16, 2013
Messages
18
Reaction score
0
Hey guys, I installed a vip system and it works without any coding problems,
but I new to this, and I don't know how to make the door system work.
I got this script:
function onUse(cid, item, frompos, item2, topos)
if getPlayerVipDays(cid) >= 1 then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.')
end
return true
end
and I want to teleport from pos: [X: 1090 | Y: 1089 | Z: 5]
to pos: [X: 372 | Y: 887 | Z: 6]
 
You don't need to add an location here, it checks the location from the item you click use one, which is the door.
 
Back
Top