• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Ghettobird's LOW LEVEL TELEPORT DOOR!

ghettobird

LUA newbie
Joined
Aug 17, 2013
Messages
679
Reaction score
132
Location
OTland
Hello otlanders, it's me again, this time i bring you a script useful when your server has a lot of players,

QUESTION:so how does this work?
ANSWER: if your level is 50 or less (you can edit the levels of course) and i click on a door with x uniqueid (u set the unique id through rme) i will get teleported to x position, if i'm higher than level 50 (or the level you put in the script) i will get a msg saying "you cannot enter because you are higher than level 50.

Ok so let's get to work!

actions/scripts
Lua:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (getPlayerLevel(cid) <= 50) then
        doTeleportThing(cid, {x=1000,y=1000,z=7})
        doCreatureSay(cid, "LOW LEVEL TELEPORT", TALKTYPE_RED)
    else 
        doPlayerSendCancel(cid, "You are higher than level 50.")
        end
    return true
end





I hope you like it, post errors :peace:

thanks to ninja for reminding me to close brackets ^_^
 
Last edited:
Make sure that you don't forget brackets ^_^
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (getPlayerLevel(cid) <= 50[COLOR=#ff0000])[/COLOR] then
        doTeleportThing(cid[COLOR=#ff0000],[/COLOR] [COLOR=#ff0000]{[/COLOR]x=1000,y=1000,z=7[COLOR=#ff0000]}[/COLOR])
        doCreatureSay(cid, "LOW LEVEL TELEPORT", TALKTYPE_RED)
    else 
        doPlayerSendCancel(cid, "You are higher than level 50.")
        end
    return true
end
 
Back
Top