-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
JavaScript:
var logs = [];
const log = function(text, time){
this.text = text
this.time = time
}
const hitboxes = [ "generic", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "body" ];
const get_hitbox = function(i){ return hitboxes[i] || "Generic" };
const hitlogs = function(){
const uid = Entity.GetEntityFromUserID(Event.GetInt("userid"));
const attacker = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
const text = "[onetap] hurt " + Entity.GetName(uid) + " for " + Event.GetInt("dmg_health") + " in " + get_hitbox(Event.GetInt("hitgroup"));
if(Entity.IsLocalPlayer(attacker) && attacker != uid) logs.push(new log(text, Globals.Tickcount()));
}
const draw = function(){
const font = Render.AddFont("Calibri", 10, 100);
for (var i in logs){
Render.StringCustom(5, 5 - (i * -15), 0, logs[i].text, [255, 255, 255, 255], font);
if (logs[i].time + 300 < Globals.Tickcount()) logs.shift();
}
}
Cheat.RegisterCallback("Draw", "draw");
Cheat.RegisterCallback("player_hurt", "hitlogs");