Nike.lua
-
Автор темы
- #1
Пишу этот пост в 2:15 ночи, так что всем доброй ночи.
Взял JS скрипт из этой темы ( original author - SkyLineCord ), чуть чуть пофиксил и добавил кастомизации.
Стало выглядеть примерно как в неверлузе:
v3 Code:
v4 Code:
! ЧТОБЫ СКРИПТ РАБОТАЛ КОРРЕКТНО НУЖНО УСТАНОВИТЬ ШРИФТ ИЗ АРХИВА !
для самых ленивых оба скрипта скрипта прикрепил к посту.
Взял JS скрипт из этой темы ( original author - SkyLineCord ), чуть чуть пофиксил и добавил кастомизации.
Стало выглядеть примерно как в неверлузе:
v3 Code:
JavaScript:
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')
JavaScript:
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')
для самых ленивых оба скрипта скрипта прикрепил к посту.
Вложения
-
39.8 KB Просмотры: 326
-
42 KB Просмотры: 325
Последнее редактирование: