Начинающий
-
Автор темы
- #1
auto dt teleport for nl
code_language.lua:
local main = ui.create("nazvanie")
auto_teleport = main:switch("Automatic teleport")
local need_teleport = false
function teleport()
if not auto_teleport:get() then return end
local local_player = entity.get_local_player()
local can_hit = function(entity)
local damage, trace = utils.trace_bullet(entity, entity:get_hitbox_position(6) , local_player:get_hitbox_position(6)) -- 1-head 2-chest 3-stomatch 4-arm 5-legs 6-feet
if damage ~= 0 then
if damage > 0 and ((trace.entity and trace.entity == local_player) or false) then
return true
end
end
return false
end
for none, enemy in pairs(entity.get_players(true)) do
if enemy == local_player then end
if can_hit(enemy) then
need_teleport = true
end
end
if need_teleport then
rage.exploit:force_teleport()
end
end
events.render:set(function()
teleport()
end)