Reduced the amount of tables.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1644 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
e27a5db409
commit
cc4a1cad39
@ -1,8 +1,8 @@
|
|||||||
function HandleBackCommand( Split, Player )
|
function HandleBackCommand( Split, Player )
|
||||||
if (X[Player:GetName()] == nil) or (Y[Player:GetName()] == nil) or (Z[Player:GetName()] == nil) then
|
if BackCoords[Player:GetName()] == nil then
|
||||||
Player:SendMessage(cChatColor.Green .. "There is no last position known")
|
Player:SendMessage(cChatColor.Green .. "There is no last position known")
|
||||||
else
|
else
|
||||||
Player:TeleportToCoords(X[Player:GetName()], Y[Player:GetName()], Z[Player:GetName()])
|
Player:TeleportToCoords(BackCoords[Player:GetName()].x, BackCoords[Player:GetName()].y, BackCoords[Player:GetName()].z)
|
||||||
Player:SendMessage(cChatColor.Green .. "You teleported back to your last known position")
|
Player:SendMessage(cChatColor.Green .. "You teleported back to your last known position")
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
function SetBackCoordinates( Player )
|
function SetBackCoordinates( Player )
|
||||||
X[Player:GetName()] = Player:GetPosX()
|
BackCoords[Player:GetName()] = Vector3i( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() )
|
||||||
Y[Player:GetName()] = Player:GetPosY()
|
|
||||||
Z[Player:GetName()] = Player:GetPosZ()
|
|
||||||
end
|
end
|
@ -7,9 +7,7 @@ SHOW_PLUGIN_NAMES = true -- If true, plugin name will be shown before commands
|
|||||||
PLUGIN = {} -- Reference to own plugin object
|
PLUGIN = {} -- Reference to own plugin object
|
||||||
BannedPlayersIni = {}
|
BannedPlayersIni = {}
|
||||||
WhiteListIni = {}
|
WhiteListIni = {}
|
||||||
X = {}
|
BackCoords = {}
|
||||||
Y = {}
|
|
||||||
Z = {}
|
|
||||||
LimitWorldsCuboid = {}
|
LimitWorldsCuboid = {}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user