2013-07-27 16:24:03 +01:00
|
|
|
function HandleTopCommand( Split, Player )
|
|
|
|
|
local World = Player:GetWorld()
|
|
|
|
|
|
|
|
|
|
local PlayerPos = Player:GetPosition()
|
|
|
|
|
local Height = World:GetHeight( math.floor(PlayerPos.x), math.floor(PlayerPos.z) )
|
|
|
|
|
SetBackCoordinates( Player )
|
|
|
|
|
Player:TeleportToCoords( PlayerPos.x, Height+1, PlayerPos.z )
|
2013-07-31 17:10:59 +01:00
|
|
|
Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. "Teleported to the topmost block")
|
2013-07-27 16:24:03 +01:00
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
end
|