Ищу indicaror (v4c\v4)

  • 717
  • 104
JavaScript:
/*

    Script: Slowed down indicator
    Author: Klient#1690

*/

var color_mod = function(perc){var r = 124*2 - 124 * perc; var g = 195 * perc; var b = 13;return [r, g, b];}
var lerp = function(a, b, percentage) {return a + (b - a) * percentage;}
if (!String.prototype.format) {String.prototype.format = function () {var args = arguments; return this.replace(/{(\d+)}/g, function (match, number) {return typeof args[number] != 'undefined' ? args[number] : match;});};}


var a_width = 0
var g_paint_handler = function() {
    var me = Entity.GetLocalPlayer()
    if (!Entity.IsAlive(me)) return
    var font = Render.GetFont("Verdana", 9, true)
    var second_font = Render.GetFont("Verdana", 14, true)

    var modifier = Entity.GetProp(me, "CCSPlayer", "m_flVelocityModifier")
    if (modifier == 1) return
    var color = color_mod(modifier)
    var alpha = Math.abs(Globals.Curtime()*4 % 2 - 1)
    var text = ("Slowed down {0}%").format(Math.floor(modifier*100))
    var text_width = 95//Render.TextSize(text, font)[0]
    a_width = lerp(a_width, Math.floor((text_width - 2) * modifier), Globals.Frametime() * 8)

    var screen = Render.GetScreenSize()
    var x = screen[0]/2 - text_width; var y = screen[1]/2 - 350

    Render.Polygon([[x + 22 - 36, y - 32 + 14 + 1], [x + 40 - 36, y + 14 + 1], [x + 4 - 36, y + 14 + 1]], [16, 16, 16, 255])
    Render.Polygon([[x + 22 - 36, y - 27 + 14 + 1], [x + 36 - 36, y + 11 + 1], [x + 8 - 36, y + 12 + 1]], [color[0], color[1], color[2], alpha*255])

    Render.String(x - 16, y - 6, 0, "!", [16, 16, 16, 255], second_font)

    Render.String(x + 8, y - 10, 0, text, [255, 255, 255, 255], font)

    Render.FilledRect(x + 9, y + 4, text_width - 2, 10, [16, 16, 16, 180])
    Render.FilledRect(x + 9, y + 4, a_width, 10, [color[0], color[1], color[2], 255])
}
Cheat.RegisterCallback("Draw", "g_paint_handler")
появился как то в зоне черный сталкер
спасибо, только сабка уже закончилась
 
Сверху Снизу