/*
author: Mikhailkrylow,
stay Home, stay YouGame.biz, netvoine
*/
// mb govnokod mne poxui
var cords = {
x: render.get_screen_size()[0]/2,
y: render.get_screen_size()[1]/2
}
function lerp(a, b, c) {
return a+(b-a)*c
}
function print(arg) {
//prikol api ukazano cheat.log_custom a ono undefined
cheat.log(arg+"");
}
var handle_binds = [
["doubletap","dt"],
["hide_shots","hs"],
["override_damage","dmg"],
["peek_assist","peek"],
["force_safepoints","safe"],
["body_aim","body"],
["fake_duck","duck"],
["ensure_lean","lean"],
["manual_left","left"],
["manual_right","right"],
["manual_back","back"],
["manual_forward","forward"],
]
var master_active = []
function get_active_binds() {
for (var i = 0; i < handle_binds.length; i++) {
if(vars.is_bind_active(handle_binds[i][0])){
if(!master_active[i]){
master_active[i] = {data: handle_binds[i], alpha: 0,offset: 11};
}
master_active[i].alpha = lerp(master_active[i].alpha,255,12*global_vars.frametime())
master_active[i].offset = lerp(master_active[i].offset,0,24*global_vars.frametime())
}else{
if(master_active[i]){
master_active[i].alpha = lerp(master_active[i].alpha,0,12*global_vars.frametime())
master_active[i].offset = lerp(master_active[i].offset,11,24*global_vars.frametime())
if(master_active[i].alpha < 1){
master_active[i] = null
}
}
}
}
return master_active
}
function on_render(){
var count = 0
var active_binds = get_active_binds()
for (var i = 0; i < active_binds.length; i++) {
if(active_binds[i]){
count+=1
render.text(
[
cords.x+1,
cords.y+11*count+5,//-active_binds[i].offset,
],
[0,0,0,active_binds[i].alpha],
6,
0,
active_binds[i].data[1]
)
render.text(
[
cords.x,
cords.y+11*count+4,//-active_binds[i].offset,
],
[0,100,200,active_binds[i].alpha],
6,
0,
active_binds[i].data[1]
)
}
}
}
register_callback("render",on_render)