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

Premium Script error (Forg 025)

ex eclipse

New Member
Joined
Jul 15, 2007
Messages
282
Reaction score
1
Location
Brazil
hi im using this scrpt ( it works in evolutions)

function onUse(cid, item, frompos, item2, topos)
if item.uid > 1 then
if isPremium(cid) 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 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,14)
else
doPlayerSendTextMessage(cid,22,'Only premium accounst may pass.')
end
return 1
else
return 0
end
end



but its not working in forgotten .. what the hell is wrong??
 
Last edited:
i'll try i tryed with getPlayerPremiumDays(cid) >= 1 but didnt work

Lua Script Error: [Action Interface]
data/actions/scripts/vip.lua:eek:nUse

attempt to index a number value


... is it impossible to make a premium door in TFS?


here is the script..
function onUse(cid, item, frompos, item2, topos)
if item.uid > 1 then

if getPlayerPremiumDays(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 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,14)
else
doPlayerSendTextMessage(cid,22,'Only Premium Accounts may pass.')
end
return 1
else
return 0
end
end
 
Last edited:
Back
Top Bottom