life is cheap, death is free!
-
Автор темы
- #1
Код:
local render = fatality.render
local config = fatality.config
local menu = fatality.menu
local cvar = csgo.interface_handler:get_cvar()
local engine_client = csgo.interface_handler:get_engine_client()
local entity_list = csgo.interface_handler:get_entity_list()
local global_vars = csgo.interface_handler:get_global_vars()
local r = math.floor( math.sin( global_vars.realtime * 2) * 127 + 128 )
local g = math.floor( math.sin( global_vars.realtime * 2 + 2 ) * 127 + 128 )
local b = math.floor( math.sin( global_vars.realtime * 2 + 4 ) * 127 + 128 )
local default_color = csgo.color(r, g, b, 255)
local c = csgo.color(145, 145, 145, 0)
local c1 = csgo.color(112, 174, 255, 255)
local c2 = csgo.color(255, 0, 0, 255)
local fis_item = config:add_item( "fis_lua", 1.0 )
local fis_item2 = config:add_item( "fis_lua2", 1.0)
local fis_item3 = config:add_item( "fis_lua3", 1.0)
local fis_checkbox = menu:add_checkbox( "Skeet Scope", "Visuals", "MISC", "Various", fis_item )
local fis_slider = menu:add_slider( "Scope length", "Visuals", "MISC", "Various", fis_item2, 0, 255, 0)
local fis_slidere = menu:add_slider( "Scope height", "Visuals", "MISC", "Various", fis_item3, 0, 255, 0)
local fisline = menu:get_reference( "Visuals", "MISC", "Various", "fisline" )
local fisline1 = menu:get_reference( "Visuals", "MISC", "Various", "fisline1" )
function on_paint()
if not engine_client:is_in_game() then
return end
local local_player = entity_list:get_localplayer()
if not local_player:is_alive() then
return end
local is_scoped = local_player:get_var_int("CCSPlayer->m_bIsScoped")
local scopeline = cvar:find_var("cl_drawhud")
if fis_item:get_bool() then
if fis_item:get_bool() then
if is_scoped then
render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - 1 + fis_item3:get_float() + 2, 1, fis_item2:get_float(), csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25) )
render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - fis_item2:get_float() - fis_item3:get_float(), 1, fis_item2:get_float(), csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255) )
render:rect_fade( render:screen_size().x / 2 - fis_item2:get_float() - fis_item3:get_float(), render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255), 1 )
render:rect_fade( render:screen_size().x / 2 + fis_item3:get_float() + 1, render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25), 1 )
scopeline:set_float(0)
else
scopeline:set_float(1)
end
end
end
end
local callbacks = fatality.callbacks
callbacks:add("paint", on_paint)
(за код не бейте, я просто переписал хуёво другую луашку)