JS-скрипт [v3/v4] Neverlose`s damage marker on onetap

Nike.lua
Олдфаг
Олдфаг
Статус
Оффлайн
Регистрация
13 Окт 2020
Сообщения
2,757
Реакции
1,465
Пишу этот пост в 2:15 ночи, так что всем доброй ночи.
Взял JS скрипт из этой темы ( original author - @SkyLineCord ), чуть чуть пофиксил и добавил кастомизации.
Стало выглядеть примерно как в неверлузе:
1620602076799.png

v3 Code:
JavaScript:
Expand Collapse Copy
UI.AddCheckbox('Damage marker')
UI.AddColorPicker('Hit color')
    UI.SetColor('Script items', 'Hit color', [255,255,255,255])
UI.AddColorPicker('Lethal hit color')
    UI.SetColor('Script items', 'Lethal hit color', [255,0,0,255])
UI.AddSliderInt('Numbers size', 8, 20)
    UI.SetValue('Script items', 'Numbers size', 12)
UI.AddSliderInt('Ticks damage lasts', 50, 600)
    UI.SetValue('Script items', 'Ticks damage lasts', 300)
UI.AddSliderInt('Damage indicator weight and speed', 1, 15)
    UI.SetValue('Script items', 'Damage indicator weight and speed', 3)

function m() {
    UI.SetEnabled('Script items', 'Ticks damage lasts', UI.GetValue('Damage marker'))
    UI.SetEnabled('Script items', 'Damage indicator weight and speed', UI.GetValue('Script items', 'Damage marker'))
    UI.SetEnabled('Script items', 'Hit color', UI.GetValue('Script items', 'Damage marker'))
    UI.SetEnabled('Script items', 'Lethal hit color', UI.GetValue('Script items', 'Damage marker'))
    UI.SetEnabled('Script items', 'Numbers size', UI.GetValue('Script items', 'Damage marker'))
}

Cheat.RegisterCallback('Draw', 'm')

var particles = []

function hurt() {
        attacker = Event.GetInt("attacker");
        index = Entity.GetEntityFromUserID(attacker);
        user_id = Event.GetInt("userid");
        user = Entity.GetEntityFromUserID(user_id);
        if (index == Entity.GetLocalPlayer() && index != user) {
            var pos = Entity.GetHitboxPosition(user, Event.GetInt("hitgroup"))
            if (pos == undefined) {
                pos = Entity.GetRenderOrigin(user)
                pos[2] = pos[2] + 30
            }
            pos[0] = (pos[0] - 10) + (Math.random() * 50)
            pos[1] = (pos[1] - 10) + (Math.random() * 50)
            pos[2] = (pos[2] - 15) + (Math.random() * 40)
    
                particles.push([pos, Globals.Tickcount() + UI.GetValue('Script items', 'Ticks damage lasts'), Event.GetInt("health"), Event.GetInt("dmg_health")])
        }
    }

Cheat.RegisterCallback('player_hurt', 'hurt')

function tick() {
        for (i = 0; i < particles.length; i++) {
            object = particles[i]
            var delta = object[1] - Globals.Tickcount()
            if (delta > 0) {
                object[0][2] += (UI.GetValue('Script items', 'Damage indicator weight and speed') / 10)
            }
        }
    }

Cheat.RegisterCallback('CreateMove', 'tick')

function draw() {
        for (var i = 0; i < particles.length; i++) {
            position = Render.WorldToScreen(particles[i][0])
            var timer = particles[i][1]  - Globals.Tickcount()
            health_remaining = particles[i][2]

            globalColor = [255,255,255,255]


            if (timer > 255) {
                timer = 255
            }
            if (!(timer < 0)) {
                if (position != undefined) {
                    if (UI.GetValue('Script items', 'Damage marker')) {
                        if (health_remaining > 0) { globalColor = UI.GetColor('Script items', 'Hit color') }
                        if (health_remaining <= 0) { globalColor = UI.GetColor('Script items', 'Lethal hit color') }
                            Render.StringCustom(position[0], position[1] + 1, 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.AddFont('MuseoSansCyrl-700.ttf', UI.GetValue('Script items', 'Numbers size'), 700))
                            Render.StringCustom(position[0], position[1] - 1, 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.AddFont('MuseoSansCyrl-700.ttf', UI.GetValue('Script items', 'Numbers size'), 700))
                            Render.StringCustom(position[0] + 1, position[1], 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.AddFont('MuseoSansCyrl-700.ttf', UI.GetValue('Script items', 'Numbers size'), 700))
                            Render.StringCustom(position[0] - 1, position[1], 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.AddFont('MuseoSansCyrl-700.ttf', UI.GetValue('Script items', 'Numbers size'), 700))
                            Render.StringCustom(position[0], position[1], 1, '-' + particles[i][3].toString(), [globalColor[0], globalColor[1], globalColor[2], timer], Render.AddFont('MuseoSansCyrl-700.ttf', UI.GetValue('Script items', 'Numbers size'), 700))
                    }
                }
            }
            if (!Entity.IsAlive(Entity.GetLocalPlayer())) particles = []
        }
    }

Cheat.RegisterCallback('Draw', 'draw')

v4 Code:
JavaScript:
Expand Collapse Copy
UI.AddSubTab(['Visuals', 'SUBTAB_MGR'], 'Damage marker')
UI.AddCheckbox(['Visuals', 'Damage marker', 'Damage marker'], 'Damage marker')
UI.AddColorPicker(['Visuals', 'Damage marker', 'Damage marker'], 'Hit color')
    UI.SetColor(['Visuals', 'Damage marker', 'Damage marker', 'Hit color'], [255,255,255,255])
UI.AddColorPicker(['Visuals', 'Damage marker', 'Damage marker'], 'Lethal hit color')
    UI.SetColor(['Visuals', 'Damage marker', 'Damage marker', 'Lethal hit color'], [255,0,0,255])
UI.AddSliderInt(['Visuals', 'Damage marker', 'Damage marker'], 'Numbers size', 8, 20)
    UI.SetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size'], 15)
UI.AddSliderInt(['Visuals', 'Damage marker', 'Damage marker'], 'Ticks damage lasts', 50, 600)
    UI.SetValue(['Visuals', 'Damage marker', 'Damage marker', 'Ticks damage lasts'], 300)
UI.AddSliderInt(['Visuals', 'Damage marker', 'Damage marker'], 'Damage indicator weight and speed', 1, 15)
    UI.SetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage indicator weight and speed'], 3)

function m() {
    UI.SetEnabled(['Visuals', 'Damage marker', 'Damage marker', 'Ticks damage lasts'], UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker']))
    UI.SetEnabled(['Visuals', 'Damage marker', 'Damage marker', 'Damage indicator weight and speed'], UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker']))
    UI.SetEnabled(['Visuals', 'Damage marker', 'Damage marker', 'Hit color'], UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker']))
    UI.SetEnabled(['Visuals', 'Damage marker', 'Damage marker', 'Lethal hit color'], UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker']))
    UI.SetEnabled(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size'], UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker']))
}

Cheat.RegisterCallback('Draw', 'm')

var particles = []

function hurt() {
        attacker = Event.GetInt("attacker");
        index = Entity.GetEntityFromUserID(attacker);
        user_id = Event.GetInt("userid");
        user = Entity.GetEntityFromUserID(user_id);
        if (index == Entity.GetLocalPlayer() && index != user) {
            var pos = Entity.GetHitboxPosition(user, Event.GetInt("hitgroup"))
            if (pos == undefined) {
                pos = Entity.GetRenderOrigin(user)
                pos[2] = pos[2] + 30
            }
            pos[0] = (pos[0] - 10) + (Math.random() * 50)
            pos[1] = (pos[1] - 10) + (Math.random() * 50)
            pos[2] = (pos[2] - 15) + (Math.random() * 40)
   
                particles.push([pos, Globals.Tickcount() + UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Ticks damage lasts']), Event.GetInt("health"), Event.GetInt("dmg_health")])
        }
    }

Cheat.RegisterCallback('player_hurt', 'hurt')

function tick() {
        for (i = 0; i < particles.length; i++) {
            object = particles[i]
            var delta = object[1] - Globals.Tickcount()
            if (delta > 0) {
                object[0][2] += (UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage indicator weight and speed']) / 10)
            }
        }
    }

Cheat.RegisterCallback('CreateMove', 'tick')

function draw() {
        for (var i = 0; i < particles.length; i++) {
            position = Render.WorldToScreen(particles[i][0])
            var timer = particles[i][1]  - Globals.Tickcount()
            health_remaining = particles[i][2]

            globalColor = [255,255,255,255]


            if (timer > 255) {
                timer = 255
            }
            if (!(timer < 0)) {
                if (position != undefined) {
                    if (UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Damage marker'])) {
                        if (health_remaining > 0) { globalColor = UI.GetColor(['Visuals', 'Damage marker', 'Damage marker', 'Hit color']) }
                        if (health_remaining <= 0) { globalColor = UI.GetColor(['Visuals', 'Damage marker', 'Damage marker', 'Lethal hit color']) }
                            Render.String(position[0], position[1] + 1, 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.GetFont('MuseoSansCyrl-700.ttf', UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size']), true))
                            Render.String(position[0], position[1] - 1, 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.GetFont('MuseoSansCyrl-700.ttf', UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size']), true))
                            Render.String(position[0] + 1, position[1], 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.GetFont('MuseoSansCyrl-700.ttf', UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size']), true))
                            Render.String(position[0] - 1, position[1], 1, '-' + particles[i][3].toString(), [0,0,0, timer], Render.GetFont('MuseoSansCyrl-700.ttf', UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size']), true))
                            Render.String(position[0], position[1], 1, '-' + particles[i][3].toString(), [globalColor[0], globalColor[1], globalColor[2], timer], Render.GetFont('MuseoSansCyrl-700.ttf', UI.GetValue(['Visuals', 'Damage marker', 'Damage marker', 'Numbers size']), true))
                    }
                }
            }
            if (!Entity.IsAlive(Entity.GetLocalPlayer())) particles = []
        }
    }

Cheat.RegisterCallback('Draw', 'draw')

! ЧТОБЫ СКРИПТ РАБОТАЛ КОРРЕКТНО НУЖНО УСТАНОВИТЬ ШРИФТ ИЗ АРХИВА !

для самых ленивых оба скрипта скрипта прикрепил к посту.
 

Вложения

Последнее редактирование:
dungeon master, спасибо тебе за этот великолепный скрипт!!!
 
А у тебя индикаторы под прицельчиком не из корда? если так скинь кодик под хайд :D
 
друган, пофикси кое-чё для в4 для всех. у тебя в скрипте не считывает шрифт, там нужно поставить пробелы между словами в названии шрифта, иначе выдаёт ошибку stack index 5 (undefined or not callable property)
 
На кряк поломанное. Если сможешь, фиксани.
csgo_1x5hJQaL53.png
 
Последнее редактирование:
UPD: Пофиксил js на v3
1620746882257.png
 
друган, пофикси кое-чё для в4 для всех. у тебя в скрипте не считывает шрифт, там нужно поставить пробелы между словами в названии шрифта, иначе выдаёт ошибку stack index 5 (undefined or not callable property)
Пофиксил
Система шрифтов в вантапе просто ужасна... Один символ проебал - все, иди нахуй. :NotLikeThis:
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
нахуя вообще-то делать визуалы этой пасты для кряка не пойму если она стрелять толком не может
 
нахуя вообще-то делать визуалы этой пасты для кряка не пойму если она стрелять толком не может
Я делал это для в4, сделал для кряка по преколу, даже не тестировал в 1 раз
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
  • Клоун
Реакции: sofy
Назад
Сверху Снизу