life is cheap, death is free!
-
Автор темы
- #1
JavaScript:
var lastkill = 0;
var kills = 0;
var headshot = false;
var badges = [];
function draw() {
if(!World.GetServerString() || Entity.IsAlive(Entity.GetLocalPlayer()) == false) badges.length = 0;
if(!World.GetServerString() || Entity.IsAlive(Entity.GetLocalPlayer()) == false) return;
if (badges.length > 0) {
for (var i = badges.slice(-11).length, j = 0; i > 0; i-- , j++) {
if (j > 11) {
j = 0;
}
RenderBadge = Render.AddTexture("ot/scripts/badge.png");
Render.TexturedRect(Global.GetScreenSize()[0] - 1600 + 35 * i, Global.GetScreenSize()[1] - 60, 68, 68, RenderBadge);
}
if (badges.length > 10) {
badges.shift();
}
}
}
function onkill() {
if(!World.GetServerString() || Entity.IsAlive(Entity.GetLocalPlayer()) == false) return;
if(Entity.GetEntityFromUserID(Event.GetInt("attacker")) == Entity.GetLocalPlayer() && Entity.GetEntityFromUserID(Event.GetInt("userid")) != Entity.GetLocalPlayer()){
kills++;
lastkill = Globals.Curtime();
{
badges.push({
type: "any"
});
}
}
}
Cheat.RegisterCallback("Draw", "draw");
Cheat.RegisterCallback("player_death", "onkill")
{
badges.push({
type: "any"
});
ВТ МЕНЯ ШЛЕТ НАХУЙ, И НЕ РИСУЕТ НИХУЯ