Kodit izke
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Отключить дефолтные логи.
ss:
JavaScript:
var logs = [];
var logs_time = [];
var logs_alpha = [];
function removeLog() {
if (logs.length > 6) {
logs.shift();
logs_time.shift();
}
if (logs_time[0] + 6.5 < global_vars.curtime()) {
logs_alpha[0] -= global_vars.frametime() * 600;
if (logs_alpha[0] < 0) {
logs.shift();
logs_time.shift();
logs_alpha.shift();
}
}
}
function logsAdd(text) {
cheat.print_to_console("[gamesense] ", [158, 176, 236]);
cheat.print_to_console(text + "\n", [255, 255, 255]);
logs.push(text);
logs_time.push(global_vars.curtime());
logs_alpha.push(255);
}
function renderLog() {
if (!entity.get_local_player()) return;
for (i = 0; i < logs.length; i++) {
render.text([7, 7 + 13 * i], [230, 230, 230, logs_alpha[i]], 12, 0, logs[i]);
}
}
register_callback('player_hurt', function() {
var userid = entity.get_player_for_user_id(current_event.get_int("userid"))
var attacker = entity.get_player_for_user_id(current_event.get_int("attacker"))
var userid_info = entity.get_player_info(userid);
var attacker_info = entity.get_player_info(attacker);
var hitgroup = current_event.get_int("hitgroup");
switch (hitgroup)
{
case 1:
hitgroup = "head";
break;
case 2:
hitgroup = "chest";
break;
case 3:
hitgroup = "stomach";
break;
case 4:
hitgroup = "left arm";
break;
case 5:
hitgroup = "right arm";
break;
case 6:
hitgroup = "right leg";
break;
case 7:
hitgroup = "left leg";
break;
default:
hitgroup = "generic";
}
if (attacker == entity.get_local_player() && userid != entity.get_local_player())
logsAdd("Hit entity: " + userid_info.name + ", hitgroup: " + hitgroup + ", damage: " + current_event.get_int("dmg_health"));
else if (userid == entity.get_local_player() && attacker != entity.get_local_player())
logsAdd("Hurt from entity: " + attacker_info.name + ", hitgroup: " + hitgroup + ", damage: " + current_event.get_int("dmg_health"));
});
register_callback('ragebot_miss', function() {
var userid = entity.get_player_for_user_id(current_event.get_int('player_index'));
var userid_info = entity.get_player_info(userid);
var hitgroup = current_event.get_int('hitbox');
switch (hitgroup)
{
case 1:
hitgroup = "head";
break;
case 2:
hitgroup = "chest";
break;
case 3:
hitgroup = "stomach";
break;
case 4:
hitgroup = "left arm";
break;
case 5:
hitgroup = "right arm";
break;
case 6:
hitgroup = "right leg";
break;
case 7:
hitgroup = "left leg";
break;
default:
hitgroup = "generic";
}
if (userid != entity.get_local_player())
logsAdd("Miss to: " + userid_info.name + ", hitbox: " + hitgroup + ", to: " + ((current_event.get_string('resolver_mode') == "") ? "spread" : "resolver"));
});
register_callback("render", function() {
removeLog();
renderLog();
});
Последнее редактирование: