JS-скрипт Team skeet indicator under crosshair (OTC) (x/y adding)

Эксперт
Статус
Оффлайн
Регистрация
22 Мар 2020
Сообщения
2,187
Реакции[?]
484
Поинты[?]
3K
Код:
UI.AddCheckbox('Indicators'), UI.AddColorPicker('color'), UI.AddSliderInt("Y Adding", -100, 150), UI.AddSliderInt("X Adding", -35, 150)
function indicators(){
    local = Entity.GetLocalPlayer();
    var keybinds = [];
    var screen = Global.GetScreenSize();
    var font = Render.AddFont("Calibri", 9, 900);
    var enable = UI.GetValue("Script items", "Indicators");
    add_y = UI.GetValue("Script items", "X Adding")  
    var s = UI.GetValue("Script items", "Y Adding")
    var color = UI.GetColor("Misc", "JAVASCRIPT", 'color');  
    var info = [
    ["DT", ["Rage", "GENERAL", "Exploits", "Doubletap"], [255 * (1.0 - Exploit.GetCharge()), 255 * Exploit.GetCharge(), 0, 255]],
    ["ONSHOT", ["Rage", "GENERAL", "Exploits", "Hide shots"], [color[0], color[1], color[2], color[3]]],
    ["BAIM", ["Rage", "GENERAL", "Force body aim"], [color[0], color[1], color[2], color[3]]],
    ["SAFE", ["Rage", "GENERAL", "Force safe point"], [color[0], color[1], color[2], color[3]]],
    ["DUCK", ["Anti-Aim", "Extra", "Fake duck"], [color[0], color[1], color[2], color[3]]],
    ["PEEK", ["Misc", "GENERAL", "Movement", "Auto peek"], [color[0], color[1], color[2], color[3]]], ];
    if (enable && Entity.IsValid(local) && Entity.IsAlive(local)) {
    for(var i in info){
        if(UI.IsHotkeyActive.apply(null, info[i][1])){
            keybinds.push(i); } }
    for(var j in keybinds) {
    Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2 + s  + 40 - (j * -13), 1, info[keybinds[j]][0], [11,11,11, color[3]], font);
    Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2+ s  + 41 - (j * -13), 1, info[keybinds[j]][0], info[keybinds[j]][2], font); } } }
Cheat.RegisterCallback("Draw", "indicators");
1625685007011.png
 
Эксперт
Статус
Оффлайн
Регистрация
19 Дек 2018
Сообщения
2,957
Реакции[?]
492
Поинты[?]
1K
Код:
UI.AddCheckbox('Indicators'), UI.AddColorPicker('color'), UI.AddSliderInt("Y Adding", -100, 150), UI.AddSliderInt("X Adding", -35, 150)
function indicators(){
    local = Entity.GetLocalPlayer();
    var keybinds = [];
    var screen = Global.GetScreenSize();
    var font = Render.AddFont("Calibri", 9, 900);
    var enable = UI.GetValue("Script items", "Indicators");
    add_y = UI.GetValue("Script items", "X Adding") 
    var s = UI.GetValue("Script items", "Y Adding")
    var color = UI.GetColor("Misc", "JAVASCRIPT", 'color'); 
    var info = [
    ["DT", ["Rage", "GENERAL", "Exploits", "Doubletap"], [255 * (1.0 - Exploit.GetCharge()), 255 * Exploit.GetCharge(), 0, 255]],
    ["ONSHOT", ["Rage", "GENERAL", "Exploits", "Hide shots"], [color[0], color[1], color[2], color[3]]],
    ["BAIM", ["Rage", "GENERAL", "Force body aim"], [color[0], color[1], color[2], color[3]]],
    ["SAFE", ["Rage", "GENERAL", "Force safe point"], [color[0], color[1], color[2], color[3]]],
    ["DUCK", ["Anti-Aim", "Extra", "Fake duck"], [color[0], color[1], color[2], color[3]]],
    ["PEEK", ["Misc", "GENERAL", "Movement", "Auto peek"], [color[0], color[1], color[2], color[3]]], ];
    if (enable && Entity.IsValid(local) && Entity.IsAlive(local)) {
    for(var i in info){
        if(UI.IsHotkeyActive.apply(null, info[i][1])){
            keybinds.push(i); } }
    for(var j in keybinds) {
    Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2 + s  + 40 - (j * -13), 1, info[keybinds[j]][0], [11,11,11, color[3]], font);
    Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2+ s  + 41 - (j * -13), 1, info[keybinds[j]][0], info[keybinds[j]][2], font); } } }
Cheat.RegisterCallback("Draw", "indicators");
Посмотреть вложение 159543
дефолт
 
Эксперт
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
1,485
Реакции[?]
928
Поинты[?]
63K
ебать расскажи пж зачем ты два цикла сделал под бинды?
а это чё вообще
1625701357558.png
 
Эксперт
Статус
Оффлайн
Регистрация
22 Мар 2020
Сообщения
2,187
Реакции[?]
484
Поинты[?]
3K
Эксперт
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
1,485
Реакции[?]
928
Поинты[?]
63K
А как рендерить обычный текст , не используя инфо?
ну может, например, сделать всё это в одном цикле?
Код:
var n_a = 0;
    if (enable && Entity.IsValid(local) && Entity.IsAlive(local)) {
        for (var i in info) {
            if (UI.IsHotkeyActive.apply(null, info[i][1])) {
                Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2 + s + 40 - (n_a * -13), 1, info[i][0], [11, 11, 11, color[3]], font);
                Render.StringCustom(screen[0] / 2 + add_y, screen[1] / 2 + s + 41 - (n_a * -13), 1, info[i][0], info[i][2], font);
                n_a++;
            }
        }
    }
ты пушишь в массив, который сразу потом обрабатываешь. это по-твоему нормально?
 
Сверху Снизу