• 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 Teleport for certain players.

pacio123

New Member
Joined
Jun 12, 2009
Messages
10
Reaction score
0
Hi I would like to ask you to teleport script (with the usual magic fields) which is a moves like a player;
Player
Player1
Player2

can enter the teleport instantly labeled a unique id.
Thanks in advance for your help, of course, REP + +
 
Lua:
local allowedPlayers,tpos = {'PLAYER1','PLAYER2','PLAYER3'},{x=1,y=2,z=3} -- change player name and pos.
function onStepIn(cid,toPosition,fromPosition,item)
    if isInArray(allowedPlayers,getCreatureName(cid):lower()) then
        doTeleportThing(cid,tpos)
        sendMagicEffect(tpos,10)
    else
        doTeleportThing(cid,fromPosition)
        doPlayerSendTextMessage(cid,27,'You are not allowed to use this teleport.')
    end
    return true
end
 
Back
Top