JS-скрипт Skeet scope with colorpicker

life is cheap, death is free!
Эксперт
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,616
Реакции
513
JavaScript:
Expand Collapse Copy
// Skeet Crosshair for OneTap Crack \\\
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693 & Konders & fallen#4008//
// Enjoy \\

UI.AddColorPicker( "Scope color" )

function render()
{
    var local = Entity.GetLocalPlayer();
    var is_scope = Entity.GetProp(local, "DT_CSPlayer", "m_bIsScoped");

    color =UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Scope color" );

    if( is_scope ) {
        var screen_size = Render.GetScreenSize();
        x = screen_size[0];
        y = screen_size[1];
        Convar.SetString("cl_drawhud", "0");

        Render.GradientRect( x/2,           y/2 - 165, 1, 150, 0, [ 55, 59, 68, 100 ], color );
        Render.GradientRect( x/2 - 165,     y/2, 150, 1, 1, [ 55, 59, 68, 100 ], color );
        Render.GradientRect( x/2 + 16,      y/2, 150, 1, 1, color, [ 55, 59, 68, 100 ]);
        Render.GradientRect( x/2,           y/2 + 16, 1, 150, 0, color, [ 55, 59, 68, 100 ]);
    }
    else
        {
        Convar.SetString("cl_drawhud", "1");
        }
}

Cheat.RegisterCallback("Draw", "render")


SS:
изображение_2021-01-24_112037.png
 
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693 \\ так думаю правильнее будет
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693 & Konders & fallen#4008//
5 человек делали колорпикер к слитому скрипту
 
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693 & Konders & fallen#4008//
5 человек делали колорпикер к слитому скрипту
не, первые три челика отвечали за сам код, я и konders за color picker и getscreen_size
 
не, первые три челика отвечали за сам код, я и konders за color picker и getscreen_size
за колор пикер отвечал @enQ за скрин сайз кондерс но лично ты ни за что не отвечал и просто добавил свой нейм в код ?
 
JavaScript:
Expand Collapse Copy
// Skeet Crosshair for OneTap Crack
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693
// Enjoy

// getscreensize added by enQ
// happy game


UI.AddSliderInt ("Distance from crosshair", 0, 200);
UI.AddSliderInt ("Size of lines", 20, 200);

function d() {
    var dist = UI.GetValue ("Misc", "JAVASCRIPT", "Script items", "Distance from crosshair");
    var size = UI.GetValue ("Misc", "JAVASCRIPT", "Script items", "Size of lines");
    var local = Entity.GetLocalPlayer();
    var is_scope = Entity.GetProp (local, "DT_CSPlayer", "m_bIsScoped");

    if ( is_scope ) {
        var screen_size = Global.GetScreenSize();
            x = screen_size[0] / 2;
            y = screen_size[1] / 2;

        Convar.SetString("cl_drawhud", "0");

        Render.GradientRect ( x + dist, y, size, 1, 1, [ 55, 59,  68,  0 ], [ 66, 134, 244, 255 ] );
        Render.GradientRect ( x, y + dist, 1, size, 0, [ 55, 59,  68,  0 ], [ 66, 134, 244, 255 ] );

        Render.GradientRect ( x - dist - size, y, size, 1, 1, [ 66, 134, 244, 255 ], [ 55, 59,  68,  0 ] );
        Render.GradientRect ( x, y - dist - size, 1, size, 0, [ 66, 134, 244, 255 ], [ 55, 59,  68,  0 ] );
    }
    else {
        Convar.SetString("cl_drawhud", "1");

    }
}

Cheat.RegisterCallback("Draw", "d")
вот это мною сделано
енка брат здаров
здарова
 
JavaScript:
Expand Collapse Copy
// Skeet Crosshair for OneTap Crack
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693
// Enjoy

// getscreensize added by enQ
// happy game


UI.AddSliderInt ("Distance from crosshair", 0, 200);
UI.AddSliderInt ("Size of lines", 20, 200);

function d() {
    var dist = UI.GetValue ("Misc", "JAVASCRIPT", "Script items", "Distance from crosshair");
    var size = UI.GetValue ("Misc", "JAVASCRIPT", "Script items", "Size of lines");
    var local = Entity.GetLocalPlayer();
    var is_scope = Entity.GetProp (local, "DT_CSPlayer", "m_bIsScoped");

    if ( is_scope ) {
        var screen_size = Global.GetScreenSize();
            x = screen_size[0] / 2;
            y = screen_size[1] / 2;

        Convar.SetString("cl_drawhud", "0");

        Render.GradientRect ( x + dist, y, size, 1, 1, [ 55, 59,  68,  0 ], [ 66, 134, 244, 255 ] );
        Render.GradientRect ( x, y + dist, 1, size, 0, [ 55, 59,  68,  0 ], [ 66, 134, 244, 255 ] );

        Render.GradientRect ( x - dist - size, y, size, 1, 1, [ 66, 134, 244, 255 ], [ 55, 59,  68,  0 ] );
        Render.GradientRect ( x, y - dist - size, 1, size, 0, [ 66, 134, 244, 255 ], [ 55, 59,  68,  0 ] );
    }
    else {
        Convar.SetString("cl_drawhud", "1");

    }
}

Cheat.RegisterCallback("Draw", "d")
вот это мною сделано

здарова
красиво сделано, спасибо возьму себе
 
АХАХАХА
 
в3 или в4?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
JavaScript:
Expand Collapse Copy
// Skeet Crosshair for OneTap Crack \\\
// Made by cr1pwalk#7306 & Morty#9999 & frisch#4693 & Konders & fallen#4008//
// Enjoy \\

UI.AddColorPicker( "Scope color" )

function render()
{
    var local = Entity.GetLocalPlayer();
    var is_scope = Entity.GetProp(local, "DT_CSPlayer", "m_bIsScoped");

    color =UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Scope color" );

    if( is_scope ) {
        var screen_size = Render.GetScreenSize();
        x = screen_size[0];
        y = screen_size[1];
        Convar.SetString("cl_drawhud", "0");

        Render.GradientRect( x/2,           y/2 - 165, 1, 150, 0, [ 55, 59, 68, 100 ], color );
        Render.GradientRect( x/2 - 165,     y/2, 150, 1, 1, [ 55, 59, 68, 100 ], color );
        Render.GradientRect( x/2 + 16,      y/2, 150, 1, 1, color, [ 55, 59, 68, 100 ]);
        Render.GradientRect( x/2,           y/2 + 16, 1, 150, 0, color, [ 55, 59, 68, 100 ]);
    }
    else
        {
        Convar.SetString("cl_drawhud", "1");
        }
}

Cheat.RegisterCallback("Draw", "render")


SS:Посмотреть вложение 127044
А можешь сделать как в пандоре Fade? Чтоб крсиво появлялся? Или API не позволит?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
api позволяет, но я не знаю как это реализовать
возьми пример из пандоры
local entity_get_client_entity = entity_list.get_client_entity
local alpha = 0

local speed_slider = ui.add_slider("Fade time", 0, 1000)
speed_slider:set(150)

local scope_color_label = ui.add_label("Scope color")
local scope_color = ui.add_colorpicker("dsda")
scope_color:set(color.new(255,255,255,235))

local scope_width = ui.add_slider("Scope width", 0, 500)
local scope_height = ui.add_slider("Scope height", 0, 500)
scope_width:set(100)
scope_height:set(100)

local scope_padding = ui.add_slider("Scope padding", 0, 250)
scope_padding:set(15)

-- maybe do this in a different function, this is just an example though
function on_paint()
-- Get screen size to render in the middle
local screen_size_x, screen_size_y = render.get_screen()
local screen_center = vector2d.new(screen_size_x / 2, screen_size_y / 2)

-- Local player check
local_player = entity_get_client_entity(engine.get_local_player())

-- Checks to see if client is in game, else return
if not engine.in_game() then
return
end

-- Local player check to see if local player is a thing
if local_player == nil then
return
end

-- Health check to see if you are alive
if local_player:get_prop("DT_BasePlayer", "m_iHealth"):get_int() <= 0 then
return
end

-- Reach full alpha in ~100ms
local multiplier = (1.0 / (speed_slider:get()/1000)) * global_vars.frametime

-- Health check to see if you are alive
if local_player:get_prop("DT_CSPlayer", "m_bIsScoped"):get_bool() then
if alpha < 1.0 then
alpha = alpha + multiplier
end
else
if alpha > 0.0 then
alpha = alpha - multiplier
end
end

-- clamp alpha not to go out of bounds
if alpha >= 1.0 then
alpha = 1
end

if alpha <= 0.0 then
alpha = 0
return
end

local r, g, b, a = scope_color:get():r(), scope_color:get():g(), scope_color:get():b(), scope_color:get():a()

-- top
local height = scope_height:get()
pos = vector2d.new(screen_center.x, screen_center.y - height)
size = vector2d.new(1, height * alpha)
pos.y = pos.y - (scope_padding:get() - 1)
render.gradient(pos.x, pos.y, size.x, size.y, color.new(0,0,0,0), color.new(r,g,b,a * alpha), false)

-- bottom
pos = vector2d.new(screen_center.x, screen_center.y + (height * ( 1.0 - alpha ) ))
size = vector2d.new(1, scope_height:get() - ( height * ( 1.0 - alpha ) ))
pos.y = pos.y + scope_padding:get()
render.gradient(pos.x, pos.y, size.x, size.y, color.new(r,g,b,a * alpha), color.new(0,0,0,0), false)

local width = scope_width:get()

-- left
pos = vector2d.new(screen_center.x - width, screen_center.y)
size = vector2d.new(width * alpha, 1)
pos.x = pos.x - (scope_padding:get() - 1)
render.gradient(pos.x, pos.y, size.x, size.y, color.new(0,0,0,0), color.new(r,g,b,a * alpha), true)

-- right
pos = vector2d.new(screen_center.x + (width* ( 1.0 - alpha ) ), screen_center.y)
size = vector2d.new(width - ( width * ( 1.0 - alpha ) ), 1)
pos.x = pos.x + scope_padding:get()
render.gradient(pos.x, pos.y, size.x, size.y, color.new(r,g,b,a * alpha), color.new(0,0,0,0), true)
end

callbacks.register("paint", on_paint)
 
возьми пример из пандоры
local entity_get_client_entity = entity_list.get_client_entity
local alpha = 0

local speed_slider = ui.add_slider("Fade time", 0, 1000)
speed_slider:set(150)

local scope_color_label = ui.add_label("Scope color")
local scope_color = ui.add_colorpicker("dsda")
scope_color:set(color.new(255,255,255,235))

local scope_width = ui.add_slider("Scope width", 0, 500)
local scope_height = ui.add_slider("Scope height", 0, 500)
scope_width:set(100)
scope_height:set(100)

local scope_padding = ui.add_slider("Scope padding", 0, 250)
scope_padding:set(15)

-- maybe do this in a different function, this is just an example though
function on_paint()
-- Get screen size to render in the middle
local screen_size_x, screen_size_y = render.get_screen()
local screen_center = vector2d.new(screen_size_x / 2, screen_size_y / 2)

-- Local player check
local_player = entity_get_client_entity(engine.get_local_player())

-- Checks to see if client is in game, else return
if not engine.in_game() then
return
end

-- Local player check to see if local player is a thing
if local_player == nil then
return
end

-- Health check to see if you are alive
if local_player:get_prop("DT_BasePlayer", "m_iHealth"):get_int() <= 0 then
return
end

-- Reach full alpha in ~100ms
local multiplier = (1.0 / (speed_slider:get()/1000)) * global_vars.frametime

-- Health check to see if you are alive
if local_player:get_prop("DT_CSPlayer", "m_bIsScoped"):get_bool() then
if alpha < 1.0 then
alpha = alpha + multiplier
end
else
if alpha > 0.0 then
alpha = alpha - multiplier
end
end

-- clamp alpha not to go out of bounds
if alpha >= 1.0 then
alpha = 1
end

if alpha <= 0.0 then
alpha = 0
return
end

local r, g, b, a = scope_color:get():r(), scope_color:get():g(), scope_color:get():b(), scope_color:get():a()

-- top
local height = scope_height:get()
pos = vector2d.new(screen_center.x, screen_center.y - height)
size = vector2d.new(1, height * alpha)
pos.y = pos.y - (scope_padding:get() - 1)
render.gradient(pos.x, pos.y, size.x, size.y, color.new(0,0,0,0), color.new(r,g,b,a * alpha), false)

-- bottom
pos = vector2d.new(screen_center.x, screen_center.y + (height * ( 1.0 - alpha ) ))
size = vector2d.new(1, scope_height:get() - ( height * ( 1.0 - alpha ) ))
pos.y = pos.y + scope_padding:get()
render.gradient(pos.x, pos.y, size.x, size.y, color.new(r,g,b,a * alpha), color.new(0,0,0,0), false)

local width = scope_width:get()

-- left
pos = vector2d.new(screen_center.x - width, screen_center.y)
size = vector2d.new(width * alpha, 1)
pos.x = pos.x - (scope_padding:get() - 1)
render.gradient(pos.x, pos.y, size.x, size.y, color.new(0,0,0,0), color.new(r,g,b,a * alpha), true)

-- right
pos = vector2d.new(screen_center.x + (width* ( 1.0 - alpha ) ), screen_center.y)
size = vector2d.new(width - ( width * ( 1.0 - alpha ) ), 1)
pos.x = pos.x + scope_padding:get()
render.gradient(pos.x, pos.y, size.x, size.y, color.new(r,g,b,a * alpha), color.new(0,0,0,0), true)
end

callbacks.register("paint", on_paint)
Сука, вкладкой "</> код" Пользуются только лохи или что
 
Назад
Сверху Снизу