diff options
-rw-r--r-- | MCServer/Plugins/Core/onplayermoving.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MCServer/Plugins/Core/onplayermoving.lua b/MCServer/Plugins/Core/onplayermoving.lua index a3a188894..c95eb0c5a 100644 --- a/MCServer/Plugins/Core/onplayermoving.lua +++ b/MCServer/Plugins/Core/onplayermoving.lua @@ -6,16 +6,16 @@ function OnPlayerMoving( Player ) local X = math.floor(Player:GetPosX() / 16)
local Z = math.floor(Player:GetPosZ() / 16)
if ( (SpawnX + LimitWorldWidth - 1) < X ) then
- Player:TeleportTo(Player:GetPosX() - 1, Player:GetPosY(), Player:GetPosZ())
+ Player:TeleportToCoords(Player:GetPosX() - 1, Player:GetPosY(), Player:GetPosZ())
end
if ( (SpawnX - LimitWorldWidth + 1) > X ) then
- Player:TeleportTo(Player:GetPosX() + 1, Player:GetPosY(), Player:GetPosZ())
+ Player:TeleportToCoords(Player:GetPosX() + 1, Player:GetPosY(), Player:GetPosZ())
end
if ( (SpawnZ + LimitWorldWidth - 1) < Z ) then
- Player:TeleportTo(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() - 1)
+ Player:TeleportToCoords(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() - 1)
end
if ( (SpawnZ - LimitWorldWidth + 1) > Z ) then
- Player:TeleportTo(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() + 1)
+ Player:TeleportToCoords(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() + 1)
end
end
end
\ No newline at end of file |