addCommandHandler("tp", function (plr,cmd,target)
if not target then return end
target = getPlayerFromName(target)
if not target then
outputChatBox("Nie znaleziono gracza", plr)
return end
outputChatBox("Gracz "..getPlayerName(target).." chce si? teleportowa?, /tpa aby zaakceptowa?", target)
setElementData(target, "TP", getPlayerName(plr))
end
)
addCommandHandler("tpa", function(plr,cmd)
target = getElementData(plr, "TP")
if not target then return end
target = getPlayerFromName(target)
if not target then return end
outputChatBox("Gracz wyrazi? zgod? na teleportacje", target)
outputChatBox("Wyrazi?e? zgod? na teleportacj?", plr)
x,y,z = getElementPosition(plr)
setElementPosition(target, x,y,z+3)
removeElementData(plr,"TP")
end
)