LUA скрипт [NL] Clantag

Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
824
Реакции[?]
93
Поинты[?]
10K
для тех кто думал что в нл самое легкое апи и нужно просто функу в каллбеке вызвать а это оказалось не так(ака Баклажан(я))
code_language.lua:
local ui_c = ui.create("G")
local ctag = ui_c:switch("Clantag", false)

enabled_prev = true

function run_tag_animation()
    if ctag:get() and globals.is_connected then
        local clan_tag = "SrEeCdRuExD.lua"
        if clan_tag ~= clan_tag_prev then
            common.set_clan_tag(clan_tag)
        end
        clan_tag_prev = clan_tag
    end
end

function clantag(ctx)
    if ctag:get() then
        local local_player = entity.get_local_player()
        if local_player ~= nil and (not local_player:is_alive()) and globals.tickcount % 2 == 0 then
            run_tag_animation()
        end
    end
end

function on_run_command()
    if ctag:get() then
        if globals.choked_commands == 0 then
            run_tag_animation()
        end
        enabled_prev = false
    elseif not ctag:get() and ebabled_prev == false then
        common.set_clan_tag("\0")
        enabled_prev = true
    end
end

events.net_update_start:set(function()
if not globals.is_in_game or not globals.is_connected or entity.get_local_player() == nil then return end
if s == 5 then
    on_run_command()
    if request_time + 1 < globals.curtime then
        frametime = globals.frametime
        request_time = globals.curtime
        table.insert(frametimes, 1, frametime)

        if #frametimes > 4 then
            table.remove(frametimes, i)
        end
    end
end
end)

events.render:set(function(ctx)
if ctag:get() then
    clantag()
end
end)
 
Олдфаг
Статус
Оффлайн
Регистрация
28 Дек 2018
Сообщения
2,585
Реакции[?]
1,437
Поинты[?]
1K
Ты неделю ебешься с клантегом?

upd: вот тебе клантег с старых примеров


code_language.lua:
local clantag = {}

clantag.last = nil

clantag.set = function(tag)
    if tag == clantag.last then
        return
    end

    common.set_clan_tag(tag)
    clantag.last = tag
end

clantag.build = function(tag)
    local ret = {}

    for i = 1, #tag do
        table.insert(ret, tag:sub(1, i))
    end

    for i = 1, #tag do
        table.insert(ret, tag:sub(i, #tag))
    end

    table.insert(ret, '')

    return ret
end

clantag.builded = clantag.build('shit')

clantag.on_render = function()
    if not globals.is_connected then
        return
    end

    local net_channel_info = utils.net_channel()

    if not net_channel_info then
        return
    end

    local latency = net_channel_info.latency[0] / globals.tickinterval
    local tickcount_pred = globals.tickcount + latency
    local iter = math.floor(math.fmod(tickcount_pred / 13, #clantag.builded)) + 1

    clantag.set(clantag.builded[iter])
end

events.render:set(clantag.on_render)

clantag.destroy = function()
    clantag.set('')
end

events.shutdown:set(clantag.destroy)
 
Последнее редактирование:
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
824
Реакции[?]
93
Поинты[?]
10K
Ты неделю ебешься с клантегом?

upd: вот тебе клантег с старых примеров


code_language.lua:
local clantag = {}

clantag.last = nil

clantag.set = function(tag)
    if tag == clantag.last then
        return
    end

    common.set_clan_tag(tag)
    clantag.last = tag
end

clantag.build = function(tag)
    local ret = {}

    for i = 1, #tag do
        table.insert(ret, tag:sub(1, i))
    end

    for i = 1, #tag do
        table.insert(ret, tag:sub(i, #tag))
    end

    table.insert(ret, '')

    return ret
end

clantag.builded = clantag.build('shit')

clantag.on_render = function()
    if not globals.is_connected then
        return
    end

    local net_channel_info = utils.net_channel()

    if not net_channel_info then
        return
    end

    local latency = net_channel_info.latency[0] / globals.tickinterval
    local tickcount_pred = globals.tickcount + latency
    local iter = math.floor(math.fmod(tickcount_pred / 13, #clantag.builded)) + 1

    clantag.set(clantag.builded[iter])
end

events.render:set(clantag.on_render)

clantag.destroy = function()
    clantag.set('')
end

events.shutdown:set(clantag.destroy)
нет просто сейчас решил выложить, а так спасибо
 
🪐 saturn solutions
Пользователь
Статус
Оффлайн
Регистрация
7 Апр 2019
Сообщения
296
Реакции[?]
34
Поинты[?]
8K
Ты неделю ебешься с клантегом?

upd: вот тебе клантег с старых примеров


code_language.lua:
local clantag = {}

clantag.last = nil

clantag.set = function(tag)
    if tag == clantag.last then
        return
    end

    common.set_clan_tag(tag)
    clantag.last = tag
end

clantag.build = function(tag)
    local ret = {}

    for i = 1, #tag do
        table.insert(ret, tag:sub(1, i))
    end

    for i = 1, #tag do
        table.insert(ret, tag:sub(i, #tag))
    end

    table.insert(ret, '')

    return ret
end

clantag.builded = clantag.build('shit')

clantag.on_render = function()
    if not globals.is_connected then
        return
    end

    local net_channel_info = utils.net_channel()

    if not net_channel_info then
        return
    end

    local latency = net_channel_info.latency[0] / globals.tickinterval
    local tickcount_pred = globals.tickcount + latency
    local iter = math.floor(math.fmod(tickcount_pred / 13, #clantag.builded)) + 1

    clantag.set(clantag.builded[iter])
end

events.render:set(clantag.on_render)

clantag.destroy = function()
    clantag.set('')
end

events.shutdown:set(clantag.destroy)
sync?
 
Sos
Пользователь
Статус
Оффлайн
Регистрация
26 Авг 2019
Сообщения
256
Реакции[?]
55
Поинты[?]
0
для тех кто думал что в нл самое легкое апи и нужно просто функу в каллбеке вызвать а это оказалось не так(ака Баклажан(я))
code_language.lua:
local ui_c = ui.create("G")
local ctag = ui_c:switch("Clantag", false)

enabled_prev = true

function run_tag_animation()
    if ctag:get() and globals.is_connected then
        local clan_tag = "SrEeCdRuExD.lua"
        if clan_tag ~= clan_tag_prev then
            common.set_clan_tag(clan_tag)
        end
        clan_tag_prev = clan_tag
    end
end

function clantag(ctx)
    if ctag:get() then
        local local_player = entity.get_local_player()
        if local_player ~= nil and (not local_player:is_alive()) and globals.tickcount % 2 == 0 then
            run_tag_animation()
        end
    end
end

function on_run_command()
    if ctag:get() then
        if globals.choked_commands == 0 then
            run_tag_animation()
        end
        enabled_prev = false
    elseif not ctag:get() and ebabled_prev == false then
        common.set_clan_tag("\0")
        enabled_prev = true
    end
end

events.net_update_start:set(function()
if not globals.is_in_game or not globals.is_connected or entity.get_local_player() == nil then return end
if s == 5 then
    on_run_command()
    if request_time + 1 < globals.curtime then
        frametime = globals.frametime
        request_time = globals.curtime
        table.insert(frametimes, 1, frametime)

        if #frametimes > 4 then
            table.remove(frametimes, i)
        end
    end
end
end)

events.render:set(function(ctx)
if ctag:get() then
    clantag()
end
end)
Ахахахах, ты со скита спиздил?
 
Сверху Снизу