LUA Hats-Hook
- От vegaban
- Garry's Mod
- 67 Скачивания
- 0 ratings
Аддон, который добавляет крюк-кошку на сервер, устанавливать в garrysmod/addons
Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
string.rotate = function(self, num)
self = string.sub(self, num+1)..string.sub(self, 1, num)
return self
end
local text = "rotate"
callbacks.add(e_callbacks.PAINT, function()
for _ = 1, #text do
print(text.."\n")
text = string.rotate(text, 1)
end
end)
Render.LerpColor = function(value, min, max) {
var r = min[0] * (1-value) + max[0] * value
var g = min[1] * (1-value) + max[1] * value
var b = min[2] * (1-value) + max[2] * value
var a = min[3] * (1-value) + max[3] * value
return [r, g, b, a]
}
Render.Gradient = function(x, y, w, h, top_left, top_right, bottom_left, bottom_right) {
//типа аптимизация ♣
if (h < w) {
for (i = 0; i < h; i++) {
Render.GradientRect(x, y + i, w, 1, 1, Render.LerpColor(i / h, top_left, bottom_left), Render.LerpColor(i / h, top_right, bottom_right))
}
}
else {
for (i = 0; i < w; i++) {
Render.GradientRect(x + i, y, 1, h, 0, Render.LerpColor(i / w, top_left, top_right), Render.LerpColor(i / w, bottom_left , bottom_right))
}
}
}
function dolbaeb() {
Render.Gradient(0, 0, 100, 100, [255, 255, 255, 255], [255, 0, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255])
}
Cheat.RegisterCallback('Draw', 'dolbaeb')