-
Автор темы
- #1
вроде должно быть под все экраны, можно менять шрифт
ss ingame:
ss ingame:
C++:
print("metamod watermark")
print("by lozzya1337")
--nickname
--додумался, просто гетает ник пользователя
local username = os.getenv("USERNAME")
local render = fatality.render
local config = fatality.config
local menu = fatality.menu
local callbacks = fatality.callbacks
local global_vars = csgo.interface_handler:get_global_vars()
local cvar = csgo.interface_handler:get_cvar()
local engine = csgo.interface_handler:get_engine_client()
local screen_size = render:screen_size()
--menu add
local visuals_tab = menu:add_button("metamod watermark", "VISUALS", "MISC", "Various")
local watermark_item = config:add_item("watermark_item", 0)
local watermark_checkbox = menu:add_checkbox("watermark", "VISUALS", "MISC", "Various", watermark_item)
local wci1 = config:add_item( "colorwatermark_slider_1", 0)
local wci2 = config:add_item( "colorwatermark_slider_2", 0)
local wci3 = config:add_item( "colorwatermark_slider_3", 0)
local wci4 = config:add_item( "colorwatermark_slider_4", 0)
local wc1 = menu:add_slider( "Color R", "VISUALS", "MISC", "Various", wci1, 0, 255, 1)
local wc2 = menu:add_slider( "Color G", "VISUALS", "MISC", "Various", wci2, 0, 255, 1)
local wc3 = menu:add_slider( "Color B", "VISUALS", "MISC", "Various", wci3, 0, 255, 1)
local wc4 = menu:add_slider( "Color A", "VISUALS", "MISC", "Various", wci4, 0, 255, 1)
--font
local wfont_mode_item = config:add_item("watermark_font_mode", 0)
local wfont_mode = menu:add_combo("font mode", "VISUALS", "MISC", "Various", wfont_mode_item)
wfont_mode:add_item("corbel", wfont_mode_item)
wfont_mode:add_item("verdana", wfont_mode_item)
local corbelfont = render:create_font("Corbel", 16, 100, true)
local verdanafont = render:create_font("Verdana", 12, 100, true)
function watermark()
local wcurrentfont = corbelfont
local text_y = 20
local text = ""
if (wfont_mode_item:get_int() == 0) then
wcurrentfont = corbelfont
text_y = 20
end
if (wfont_mode_item:get_int() == 1) then
wcurrentfont = verdanafont
text_y = 22
end
if (watermark_item:get_bool()) then
if engine:is_connected() then
text = "gamesense | "..username.." | delay: "..math.abs(engine:get_ping()).."ms | "..math.floor(1.0/global_vars.interval_per_tick).."tick | "..os.date("%X")
else
text = "gamesense | "..username.." | "..os.date("%X")
end
local w = render:text_size(wcurrentfont, text)
render:rect_filled(screen_size.x -28 -w.x, screen_size.y - screen_size.y+17, w.x + 16, 21, csgo.color(0,0,0,wci4:get_int()));
render:rect_filled(screen_size.x -28 -w.x, screen_size.y - screen_size.y+17, w.x + 16, 2, csgo.color(wci1:get_int(),wci2:get_int(),wci3:get_int(),255));
render:text(wcurrentfont, screen_size.x -20 -w.x, text_y, text, csgo.color(255,255,255,255))
end
end
callbacks:add("paint", watermark)
Последнее редактирование: