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

TFS 0.X how to make this door looks like open?

caquinha

Member
Joined
Aug 8, 2016
Messages
248
Solutions
1
Reaction score
24
how to make this door looks like open?

Code:
13:00 You see a closed door.
ItemID: [5123], ActionID: [7428].

Code:
function onUse(cid, item, frompos, item2, toPosition)
    if getPlayerLevel(cid) <= 30 then
        doTeleportThing(cid, toPosition)
    else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Only players of level 30 and below can enter here.")
    end
    return true
end

i just teleport the player to the door, but it looks like weird
 
Solution
For everybody with the same problem...
Solution:
Code:
function onUse(cid, item, frompos, item2, toPosition)
    if getPlayerLevel(cid) <= 30 then
        doTeleportThing(cid, toPosition)
        doTransformItem(item.uid, item.itemid + 1)
    else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Only players of level 30 and below can enter here.")
    end
    return true
end
doTeleportThing() is what teleports the player to the location. Check out the other door's code and look at what happens when players right click them ( it should be something other than doTeleportThing(), so mimic that instead )
 
For everybody with the same problem...
Solution:
Code:
function onUse(cid, item, frompos, item2, toPosition)
    if getPlayerLevel(cid) <= 30 then
        doTeleportThing(cid, toPosition)
        doTransformItem(item.uid, item.itemid + 1)
    else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Only players of level 30 and below can enter here.")
    end
    return true
end
 
Solution
Back
Top