mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 04:06:39 +09:00
Add /tp Command To Co-Exist With /bring And /go-to (#65)
* Add !evolution to auto-chat.lua * Add !evolution to chat-bot.cfg * Fixed syntax error and converted to two decimal places * Add the /tp command to co-exist with /bring and /go-to * Add /tp command to co-exist with /bring and /go-to into admin.lua * Fix /tp * Fix admin.lua * Fixed Admin.tp call
This commit is contained in:
@@ -214,4 +214,16 @@ function Admin.bring(player,by_player)
|
||||
local _player = Game.get_player(by_player)
|
||||
if not player or not _player then return end
|
||||
player.teleport(_player.surface.find_non_colliding_position('player',_player.position,32,1),_player.surface)
|
||||
end
|
||||
end
|
||||
|
||||
function Admin.tp(from_playaer, to_player)
|
||||
local _from_player = Game.get_player(from_player)
|
||||
local _to_player = Game.get_player(to_player)
|
||||
|
||||
if not _from_player or not _to_player then return end
|
||||
|
||||
if Game.players[_from_player].health >= 0 then return end
|
||||
if Game.players[_to_player].health >= 0 then return end
|
||||
|
||||
_from_player.teleport(_to_player.surface.find_non_colliding_position('player',_to_player.position,32,1),_to_player.surface)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user