• 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 [tfs 1.4.2] Close ModalWindow when player walk away

Darekzio

New Member
Joined
Apr 26, 2024
Messages
9
Reaction score
0
Hello, i need script onStep that only players with level higher than 150 can go, the players with level below getting stepback from the floor and receive modalwindow message that their level is too low. If The player move or walk away the modalwindow are closed automaticaly

currently i have

XML:
<movevent type="StepIn" actionid="17000" event="script" value="leveltile.lua" />

Lua:
function onStepIn(cid, item, position, fromPosition)
    if getPlayerLevel(cid) > 150 then
            doPlayerSendTextMessage(cid, "Good Luck.")
        else
            doPlayerSendCancel(cid, "You need to be level 150")
            doTeleportThing(cid, fromPosition)
        end
        return true
end
 
Last edited:
Back
Top