Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local command_name = "call"
- safe_pcall(function()
- local local_player_manager = Managers.player
- if not local_player_manager or not local_player_manager.is_server then
- EchoConsole("Not the host!")
- return
- end
- local local_player = local_player_manager:local_player()
- local local_player_unit = local_player.player_unit
- if not Unit.alive(local_player_unit) then
- EchoConsole("No teleport destination!")
- return
- end
- local player_position = Unit.local_position(local_player_unit, 0)
- for _, bot_player in ipairs(Managers.player:bots()) do
- local bot_unit = bot_player.player_unit
- if Unit.alive(bot_unit) then
- if ScriptUnit.has_extension(bot_unit, "status_system") then
- local status_extension = ScriptUnit.extension(bot_unit, "status_system")
- if not status_extension.knocked_down and not status_extension.dead and ScriptUnit.has_extension(bot_unit, "locomotion_system") then
- local locomotion_extension = ScriptUnit.extension(bot_unit, "locomotion_system")
- if not locomotion_extension._disabled then
- status_extension.fall_height = -1 * math.huge
- locomotion_extension.teleport_to(locomotion_extension, player_position)
- status_extension.fall_height = -1 * math.huge
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment