Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

LUA скрипт [SpirtHack] Spectator list

Эксперт
Эксперт
Статус
Оффлайн
Регистрация
10 Фев 2021
Сообщения
1,753
Реакции
558
До конца не тестил но вроде все ворк нормально
код мб кринжак но воркает
C++:
Expand Collapse Copy
local screen = EngineClient.GetScreenSize()
local font = Render.InitFont("Verdana", 12,{'r'})
local memory = {}
local enabled = Menu.SwitchColor("Main", "Enabled", false, Color.new(0, 0, 0))
local first_color = Menu.ColorEdit("Main", "First color", Color.new(1, 0, 0))
local second_color = Menu.ColorEdit("Main", "Second color", Color.new(0, 1, 0))
local third_color = Menu.ColorEdit("Main", "Third color", Color.new(0, 0, 1 ))
local spec = {
    x = Menu.SliderInt("Main", "Spectators x", 300, 0, screen.x),
    y = Menu.SliderInt("Main", "Spectators y", 400, 0, screen.y)
}
spec.x:SetVisible(false)
spec.y:SetVisible(false)
Menu.Button("Main", "Reset position",function()
    spec.x:Set(300)
    spec.y:Set(400)
end)
function move(x,y,w,h,sldx,sldy)
    local mp = Cheat.GetMousePos()
    if Cheat.IsKeyDown(0x01) then
        if mp.x > x and mp.x < x+w and mp.y > y and mp.y < y+h then
            if drg == 0 then
                drg = 1
                memory[0] = x-mp.x
                memory[1] = y-mp.y
            end
        end
    else
        drg = 0
    end
    if drg == 1 then
        sldx:Set(mp.x + memory[0])
        sldy:Set(mp.y + memory[1])
    end
end
function get_spectators(player)
    local spectats = {}
    local players = EntityList.GetPlayers()
    for player_index, player_entity in pairs(players) do
        if (player_entity:IsDormant() == false) then
            local spectateMode = player_entity:GetProp("m_iObserverMode")
            local spectatePlayer = player_entity:GetProp("m_hObserverTarget")
            if spectatePlayer then
                if spectateMode ~= 6 then
                    local spectatingEntity = EntityList.GetClientEntityFromHandle(spectatePlayer)
                    if spectatingEntity ~= nil and (spectatingEntity:EntIndex() == player:EntIndex() or spectatingEntity:EntIndex() == EntityList.GetClientEntityFromHandle(player:GetProp("m_hObserverTarget")):EntIndex()) then
                        table.insert(spectats, {
                            name = string.len(player_entity:GetName()) > 16 and string.sub(player_entity:GetName(), 0, 16) .. "..." or player_entity:GetName(),
                        })
                    end
                end
            end
        end
    end
    return spectats
end
Cheat.RegisterCallback("draw", function()
    if not enabled:Get() then return end
    local specx,specy = spec.x:Get(),spec.y:Get()
    local lc = EntityList.GetLocalPlayer()
    if lc ~= nil then
        specs = get_spectators(lc)
    else
        specs = {}
    end
    local specs = get_spectators(lc)
    for k,v in pairs(specs) do
        Render.Text(v.name, Vector2.new(specx, specy+22+((k-1)*13)),Color.new(1,1,1), 12,font)
    end
    if #specs ~= 0 or Cheat.IsMenuVisible() then
        Render.BoxFilled(Vector2.new( specx, specy+2),Vector2.new( specx+120, specy+22), enabled:GetColor())
        Render.GradientBoxFilled(Vector2.new(specx, specy),Vector2.new( specx+120/2, specy+2), first_color:GetColor(), second_color:GetColor(), first_color:GetColor(), second_color:GetColor())
        Render.GradientBoxFilled(Vector2.new( specx+120/2, specy),Vector2.new( specx+120, specy+2), second_color:GetColor(), third_color:GetColor(), second_color:GetColor(), third_color:GetColor())
        Render.Text("Spectator list", Vector2.new(specx+120/5, specy+5),Color.new(1,1,1), 12,font)
        move(specx,specy,120,22,spec.x,spec.y)
    end
end)
1634913613656.png
 
Последнее редактирование:
[SPIRTHACK][Lua] Error in "spec": [string "local screen = EngineClient...."]:46: attempt to index a nil value
stack traceback:
[string "local screen = EngineClient...."]:46: in function 'get_spectators'
[string "local screen = EngineClient...."]:62: in function <[string "local screen = EngineClient...."]:57>
 
[SPIRTHACK][Lua] Error in "spec": [string "local screen = EngineClient...."]:46: attempt to index a nil value
stack traceback:
[string "local screen = EngineClient...."]:46: in function 'get_spectators'
[string "local screen = EngineClient...."]:62: in function <[string "local screen = EngineClient...."]:57>
Знаю ошибку, сам замечал. Потом пофикшу, ок?
Сейчас на уроке
 
В спирте и нл можно хоть с чем, апи позволяет делать абсолютно все что возможно в кс
по идее же можно сделать нормальный автопик, который будет телепортировать назад?
 
по идее же можно сделать нормальный автопик, который будет телепортировать назад?
вот тут как раз таки вроде нет, я через что не пытался чит стреляет раньше. Поправьте если не прав
 
предложи новое , сделаем.
самое оптимальное на данное время (10.28.21,16:54) - метамод.
есть много вариантов, если включить фантазию, а не пытаться сделать как у всех
 
Хорошо, допустим у меня нет фантазии , раз критикуешь - предлагай.
в том же 2к17 были более прикольные вотерка/кейбинды
самые красивые на данный момент в неверлузе
 
в том же 2к17 были более прикольные вотерка/кейбинды
самые красивые на данный момент в неверлузе
Окей, опять же, это твое личное мнение, 2k17 тот же метамод же
 
Назад
Сверху Снизу