UI.AddCheckbox("Enable Logs");
hitboxes = [
'generic',
'head',
'chest',
'stomach',
'left arm',
'right arm',
'left leg',
'right leg',
'?'
];
var scriptitems = ('Misc', 'JAVASCRIPT', 'Script items'),
shots = 0,
predicthc = 0,
safety = 0,
hitboxName = '',
choked = 0,
exploit = 0,
logs = [],
logsct = [],
logsalpha = [];
function getHitboxName(dh) {
switch (dh) {
case 0:
hitboxName = 'head';
break;
case 1:
hitboxName = 'head';
break;
case 2:
hitboxName = 'stomach';
break;
case 3:
hitboxName = 'stomach';
break;
case 4:
hitboxName = 'stomach';
break;
case 5:
hitboxName = 'chest';
break;
case 6:
hitboxName = 'chest';
break;
case 7:
hitboxName = 'left leg';
break;
case 8:
hitboxName = 'right leg';
break;
case 9:
hitboxName = 'left leg';
break;
case 10:
hitboxName = 'right leg';
break;
case 11:
hitboxName = 'left leg';
break;
case 12:
hitboxName = 'right leg';
break;
case 13:
hitboxName = 'left arm';
break;
case 14:
hitboxName = 'right arm';
break;
case 15:
hitboxName = 'left arm';
break;
case 16:
hitboxName = 'left arm';
break;
case 17:
hitboxName = 'right arm';
break;
case 18:
hitboxName = 'right arm';
break;
default:
hitboxName = 'body';
}
return hitboxName;
}
function HitgroupName(di) {
return hitboxes[di] || 'body';
}
var target = -1,
shots_fired = 0,
hits = 0,
lastUpdate = 0,
logged = false;
function ragebot_fire() {
predicthc = Event.GetInt('hitchance');
safety = Event.GetInt('safepoint');
hitboxName = getHitboxName(Event.GetInt('hitbox'));
exploit = (Event.GetInt('exploit') + 1).toString();
target = Event.GetInt('target_index');
shots_fired++;
logged = false;
lastUpdate = Globals.Curtime();
}
function hitlog() {
if (UI.GetValue('Script items', 'Enable Logs')) {
var dj = Entity.GetEntityFromUserID(Event.GetInt('userid')),
dk = Entity.GetEntityFromUserID(Event.GetInt('attacker'));
if (dk == Entity.GetLocalPlayer() && dj == target) {
hits++;
}
var dl = 'Hit ';
me = Entity.GetLocalPlayer();
hitbox = Event.GetInt('hitgroup');
target_damage = Event.GetInt('dmg_health');
target_health = Event.GetInt('health');
victim = Event.GetInt('userid');
dk = Event.GetInt('attacker');
weapon = Event.GetString('weapon');
victimIndex = Entity.GetEntityFromUserID(victim);
attackerIndex = Entity.GetEntityFromUserID(dk);
name = Entity.GetName(victimIndex);
var dm = Globals.Tickcount() % 17,
dn = '';
if (exploit == 2) {
dn += 'T';
}
dn += 'B';
if (hitbox == 1) {
dn += 'H';
}
if (safety == 1) {
safety = 'true';
} else {
safety = 'false';
}
if (weapon == 'hegrenade') {
dl = 'Naded ';
} else {
if (weapon == 'inferno') {
dl = 'Burned ';
} else {
if (weapon == 'knife') {
dl = 'Knifed ';
}
}
}
if (me == attackerIndex && me != victimIndex) {
Cheat.PrintColor([
89,
119,
239,
255
], '[gamesense] ');
if (dl == 'Hit ') {
Cheat.Print('Shot at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')\n');
logs.push('Registered shot at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')');
} else {
Cheat.Print('Damage - ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')\n');
logs.push('Registered damage at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')');
}
logsct.push(Globals.Curtime());
logsalpha.push(255);
}
if (shots == 99) {
shots = 0;
} else {
shots++;
}
}
}
function removelogs() {
if (UI.GetValue('Script items', 'Enable Logs')) {
if (logs.length > 6) {
logs.shift();
logsct.shift();
logsalpha.shift();
}
if (logsct[0] + 6.5 < Globals.Curtime()) {
logsalpha[0] -= Globals.Frametime() * 600;
if (logsalpha[0] < 0) {
logs.shift();
logsct.shift();
logsalpha.shift();
}
}
}
}
function item_purchase() {
if (UI.GetValue('Script items', 'Enable Logs')) {
Cheat.PrintColor([
89,
119,
239,
255
], '[gamesense] ');
Cheat.Print(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt('userid'))) + ' buy ' + Event.GetString('weapon') + '\n');
logs.push(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt('userid'))) + ' buy ' + Event.GetString('weapon') + '');
logsct.push(Globals.Curtime());
logsalpha.push(255);
}
}
function onDraw() {
if (UI.GetValue('Script items', 'Enable Logs')) {
if (!World.GetServerString()) {
return;
}
var dp = Render.AddFont('Lucida Console', 8, 0);
for (i = 0; i < logs.length; i++) {
Render.StringCustom(4, 4 + 13 * i, 0, logs[i], [
0,
0,
0,
logsalpha[i]
], dp);
Render.StringCustom(3, 3 + 13 * i, 0, logs[i], [
255,
255,
255,
logsalpha[i]
], dp);
}
if (shots_fired > hits && Globals.Curtime() - lastUpdate > 0.33) {
if (Globals.Curtime() - lastUpdate > 1) {
shots_fired = 0;
hits = 0;
}
}
}
}
Global.RegisterCallback('ragebot_fire', 'ragebot_fire');
Global.RegisterCallback('item_purchase', 'item_purchase');
Global.RegisterCallback('player_hurt', 'hitlog');
Global.RegisterCallback('Draw', 'onDraw');
Global.RegisterCallback('Draw', 'removelogs');
хм во 1 ты апнул тему, во 2 там не так сложно было сделать. У меня была ошибка в гет валуе на активен чекбокс, или нет.Фиксанул логи, теперь работают
Код:UI.AddCheckbox("Enable Logs"); hitboxes = [ 'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', '?' ]; var scriptitems = ('Misc', 'JAVASCRIPT', 'Script items'), shots = 0, predicthc = 0, safety = 0, hitboxName = '', choked = 0, exploit = 0, logs = [], logsct = [], logsalpha = []; function getHitboxName(dh) { switch (dh) { case 0: hitboxName = 'head'; break; case 1: hitboxName = 'head'; break; case 2: hitboxName = 'stomach'; break; case 3: hitboxName = 'stomach'; break; case 4: hitboxName = 'stomach'; break; case 5: hitboxName = 'chest'; break; case 6: hitboxName = 'chest'; break; case 7: hitboxName = 'left leg'; break; case 8: hitboxName = 'right leg'; break; case 9: hitboxName = 'left leg'; break; case 10: hitboxName = 'right leg'; break; case 11: hitboxName = 'left leg'; break; case 12: hitboxName = 'right leg'; break; case 13: hitboxName = 'left arm'; break; case 14: hitboxName = 'right arm'; break; case 15: hitboxName = 'left arm'; break; case 16: hitboxName = 'left arm'; break; case 17: hitboxName = 'right arm'; break; case 18: hitboxName = 'right arm'; break; default: hitboxName = 'body'; } return hitboxName; } function HitgroupName(di) { return hitboxes[di] || 'body'; } var target = -1, shots_fired = 0, hits = 0, lastUpdate = 0, logged = false; function ragebot_fire() { predicthc = Event.GetInt('hitchance'); safety = Event.GetInt('safepoint'); hitboxName = getHitboxName(Event.GetInt('hitbox')); exploit = (Event.GetInt('exploit') + 1).toString(); target = Event.GetInt('target_index'); shots_fired++; logged = false; lastUpdate = Globals.Curtime(); } function hitlog() { if (UI.GetValue('Script items', 'Enable Logs')) { var dj = Entity.GetEntityFromUserID(Event.GetInt('userid')), dk = Entity.GetEntityFromUserID(Event.GetInt('attacker')); if (dk == Entity.GetLocalPlayer() && dj == target) { hits++; } var dl = 'Hit '; me = Entity.GetLocalPlayer(); hitbox = Event.GetInt('hitgroup'); target_damage = Event.GetInt('dmg_health'); target_health = Event.GetInt('health'); victim = Event.GetInt('userid'); dk = Event.GetInt('attacker'); weapon = Event.GetString('weapon'); victimIndex = Entity.GetEntityFromUserID(victim); attackerIndex = Entity.GetEntityFromUserID(dk); name = Entity.GetName(victimIndex); var dm = Globals.Tickcount() % 17, dn = ''; if (exploit == 2) { dn += 'T'; } dn += 'B'; if (hitbox == 1) { dn += 'H'; } if (safety == 1) { safety = 'true'; } else { safety = 'false'; } if (weapon == 'hegrenade') { dl = 'Naded '; } else { if (weapon == 'inferno') { dl = 'Burned '; } else { if (weapon == 'knife') { dl = 'Knifed '; } } } if (me == attackerIndex && me != victimIndex) { Cheat.PrintColor([ 89, 119, 239, 255 ], '[gamesense] '); if (dl == 'Hit ') { Cheat.Print('Shot at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')\n'); logs.push('Registered shot at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')'); } else { Cheat.Print('Damage - ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')\n'); logs.push('Registered damage at ' + HitgroupName(hitbox) + ' (target: ' + name + ' | damage: ' + target_damage.toString() + ' | [' + target_health.toString() + '] | hc = ' + predicthc.toString() + '% | ' + dm + ':' + exploit + ')'); } logsct.push(Globals.Curtime()); logsalpha.push(255); } if (shots == 99) { shots = 0; } else { shots++; } } } function removelogs() { if (UI.GetValue('Script items', 'Enable Logs')) { if (logs.length > 6) { logs.shift(); logsct.shift(); logsalpha.shift(); } if (logsct[0] + 6.5 < Globals.Curtime()) { logsalpha[0] -= Globals.Frametime() * 600; if (logsalpha[0] < 0) { logs.shift(); logsct.shift(); logsalpha.shift(); } } } } function item_purchase() { if (UI.GetValue('Script items', 'Enable Logs')) { Cheat.PrintColor([ 89, 119, 239, 255 ], '[gamesense] '); Cheat.Print(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt('userid'))) + ' buy ' + Event.GetString('weapon') + '\n'); logs.push(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt('userid'))) + ' buy ' + Event.GetString('weapon') + ''); logsct.push(Globals.Curtime()); logsalpha.push(255); } } function onDraw() { if (UI.GetValue('Script items', 'Enable Logs')) { if (!World.GetServerString()) { return; } var dp = Render.AddFont('Lucida Console', 8, 0); for (i = 0; i < logs.length; i++) { Render.StringCustom(4, 4 + 13 * i, 0, logs[i], [ 0, 0, 0, logsalpha[i] ], dp); Render.StringCustom(3, 3 + 13 * i, 0, logs[i], [ 255, 255, 255, logsalpha[i] ], dp); } if (shots_fired > hits && Globals.Curtime() - lastUpdate > 0.33) { if (Globals.Curtime() - lastUpdate > 1) { shots_fired = 0; hits = 0; } } } } Global.RegisterCallback('ragebot_fire', 'ragebot_fire'); Global.RegisterCallback('item_purchase', 'item_purchase'); Global.RegisterCallback('player_hurt', 'hitlog'); Global.RegisterCallback('Draw', 'onDraw'); Global.RegisterCallback('Draw', 'removelogs');
Да, я апаю тему. Но прочитал я только сейчас. Это было сделано для тех, кто не мог сам это сделать. Ещё раз сорян за ап темы.хм во 1 ты апнул тему, во 2 там не так сложно было сделать. У меня была ошибка в гет валуе на активен чекбокс, или нет.