Вопрос Обновите скрипт

Забаненный
Статус
Оффлайн
Регистрация
6 Янв 2020
Сообщения
119
Реакции[?]
20
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Это самый красивый и адекватный из всех плеерлистов на вт. Если обновят шрифты, советую юзать именно его. Кто обновит-поцелуй в попу
JavaScript:
var selected_player = -1
var was_not_clicking = false
var settings = []
var first_pos = []
var menu_x = 200
var menu_y = 200
var menu_width = 300
var menu_height = 360
var has_clicked = false
var on_slider = false
function draw() {
    if(!UI.IsMenuOpen())
        return
   
    var font = Render.AddFont("verdana", 12, 400)
   
    var clicking = false
    if(!Input.IsKeyPressed(1))
    {
        has_clicked = false
        was_not_clicking = true
    }
       
    if(Input.IsKeyPressed(1) && was_not_clicking)
    {
        clicking = true
        was_not_clicking = false
    }
    var mpos = Input.GetCursorPosition()
    if(clicking && mpos[0] > menu_x && mpos[0] < menu_x + menu_width &&
                   mpos[1] > menu_y && mpos[1] < menu_y + menu_height)
    {
        first_pos = [mpos[0] - menu_x, mpos[1] - menu_y]
    }
   
    var players = Entity.GetPlayers()
   
    var menu_bg_col = [34, 34, 34, 255]
    Render.FilledRect(menu_x, menu_y, menu_width, menu_height, menu_bg_col)
    var player_bg_y = menu_y + 15
    var player_bg_h = menu_height - 30
    var player_bg_x = menu_x + menu_width / 2 + 20
    var player_bg_w = 120
    var player_bg_col = [14, 14, 14, 255]
    Render.FilledRect(player_bg_x, player_bg_y, player_bg_w, player_bg_h, player_bg_col)
   
    for (i in players) {
        if(settings[players[i]] == null)
            settings[players[i]] = []
        if(settings[players[i]].priority == null)
            settings[players[i]].priority = false
        if(settings[players[i]].safety == null)
            settings[players[i]].safety = false
        if(settings[players[i]].ignore == null)
            settings[players[i]].ignore = false
        if(settings[players[i]].show_info == null)
            settings[players[i]].show_info = false
        if(settings[players[i]].overridedmg == null)
            settings[players[i]].overridedmg  = false
        if(settings[players[i]].dmgamount == null)
            settings[players[i]].dmgamount = 0
        var name = Entity.GetName(players[i])
        var size = Render.TextSize(name, font)
        var set = false
        while(size[0] > 110)
        {
            name = name.substring(0,name.length-1)
            size = Render.TextSize(name, font)
            set = true
        }
        if(set)
        {
            name = name.substring(0,name.length-3)
            name += "..."
        }
        var size = Render.TextSize(name, font)
        var player_x = menu_x + menu_width - size[0] - 20
        var player_y = menu_y + 20 + (i * 15)
        var player_col = selected_player == players[i] ? [100, 255, 100, 255] : (Entity.IsTeammate(players[i]) ? [100,100,255,255] : [255,100,100,255])
        Render.String(player_x, player_y, 0, name, player_col, font)
        if (mpos[0] > player_x && mpos[0] < player_x + size[0] &&
            mpos[1] > player_y && mpos[1] < player_y + size[1] &&
            clicking)
        {
            selected_player = players[i]
        }
    }
    if (selected_player != -1)
    {
        var x = menu_x + 10
        var y = menu_y + 20
        var button = function(name)
        {
           
            Render.FilledRect(x,y,120,40,[50,50,50,255])
            var string_x = x + (120/2)
            Render.String(string_x, y + 10, 1, name, [255,255,255,255], font)
            y += 50
            var temp_y = y - 50
            if(mpos[0] > x && mpos[0] < x + 120 &&
                mpos[1] > temp_y && mpos[1] < temp_y + 40 &&
                clicking)
                return true
            return false
        }
        var checkbox = function(name, val)
        {
            Render.FilledRect(x, y, 10, 10, val ? [100,255,100,255] : [14,14,14,255])
            Render.String(x + 14, y - 5, 0, name, [255,255,255,255], font)
            y += 20
            return clicking &&
            mpos[0] > x && mpos[0] < x + 10 &&
            mpos[1] > y - 20 && mpos[1] < y - 10 ? !val : val
        }
        var slider = function(name,val,min,max,disp_text)
        {
            var delta = max-min
            var testval = val - min
            var ratio = testval/delta
            Render.FilledRect(x,y + 15,120,7,[14,14,14,255])
            Render.String(x,y - 5,0,name,[255,255,255,255],font)
            Render.FilledRect(x,y+15,120*ratio,7,[100,255,100,255])
            var size = Render.TextSize(disp_text, font)
            Render.String(x + 120 - size[0],y - 5,0,disp_text,[255,255,255,255], font)
            if(mpos[0] > x && mpos[0] < x + 120 && mpos[1] > y+15 && mpos[1] < y + 7+15)
            {
                if(Input.IsKeyPressed(1)){
                var nratio = (mpos[0] - x) / 120
                if(nratio > 1)
                    nratio = 1
                val = (nratio * delta) + min
                on_slider = true
                }
                on_slider = true
            }
            if(!Input.IsKeyPressed(1) && on_slider)
            {
                on_slider = false
            }
           
            y += 30
            return val
        }
        if(Entity.IsTeammate(selected_player) && button("Vote kick"))
        {
            var userid = -1
            var i = 0
            while(userid == -1)
            {
                var temp = Entity.GetEntityFromUserID(i)
                if(temp == selected_player && Entity.IsValid(temp))
                {
                    userid = i
                }
                i++
            }
            if(userid != -1)
                Cheat.ExecuteCommand("callvote kick " + userid)
        }
       
        if(Entity.IsEnemy(selected_player))
        {
            settings[selected_player].priority =    checkbox("Prioritize", settings[selected_player].priority)
            settings[selected_player].safety =      checkbox("Safety", settings[selected_player].safety)
            settings[selected_player].ignore =      checkbox("Ignore", settings[selected_player].ignore)
            settings[selected_player].overridedmg = checkbox("Override Damage", settings[selected_player].overridedmg)
            if(settings[selected_player].overridedmg)
            {
                var val = Math.floor(settings[selected_player].dmgamount)
                var disp = val + ""
                if(val > 100)
                {
                    disp = "HP + " + (val - 100)
                }
                settings[selected_player].dmgamount = slider("Damage", val, 0,130, disp)
            }
        }
        settings[selected_player].show_info =   checkbox("Show Info", settings[selected_player].show_info)
        if(settings[selected_player].show_info)
        {
            var str = function(text)
            {
                Render.String(x,y,0,text, [255,255,255,255], font)
                y += 15
            }
            var floor_array = function(arr)
            {
                for(i in arr)
                {
                    arr[i] = Math.floor(arr[i])
                }
                return arr
            }
            var origin = floor_array(Entity.GetRenderOrigin(selected_player))
           
            var angles = floor_array(Entity.GetProp(selected_player, "CCSPlayer", "m_angEyeAngles"))
            str("Info:")
            var name = Entity.GetName(selected_player)
            var size = Render.TextSize(name,font)
            var set = false
            while(size[0] > 100)
            {
                name = name.substr(0,name.length-1)
                size = Render.TextSize(name, font)
                set = true
            }
            if(set)
            {
                name += "..."
            }
            str("Name: " + name)
            str("Origin: " + origin)
            str("Teammate: " + Entity.IsTeammate(selected_player))
        }
        y = menu_y + menu_width
        if(button("Reset Player"))
        {
            settings[selected_player] = null
        }
    }
    if((Input.IsKeyPressed(1) && mpos[0] > menu_x && mpos[0] < menu_x + menu_width &&
        mpos[1] > menu_y && mpos[1] < menu_y + menu_height && !on_slider) || has_clicked)
    {
        menu_x = mpos[0] - first_pos[0]
        menu_y = mpos[1] - first_pos[1]
        has_clicked = true
    }
}
function cm()
{
    var players = Entity.GetPlayers()
    for(i in players)
    {
        var options = settings[players[i]]
        if(options == null || options == undefined)
            continue
        if(options.priority)
        {
            Ragebot.ForceTarget(players[i])
        }
           
        if(options.safety)
            Ragebot.ForceTargetSafety(players[i])
        if(options.ignore)
            Ragebot.IgnoreTarget(players[i])
        if(options.overridedmg)
        {
            var dmg = options.dmgamount
           
            Ragebot.ForceTargetMinimumDamage(players[i], dmg)
        }
    }
}
Cheat.RegisterCallback("CreateMove", "cm")
Cheat.RegisterCallback("Draw", "draw")
 
Сверху Снизу