-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Данный сурс работает на основе зажатия кнопки, т.е триггер работает только при зажатии.
Как из этого сурса сделать постоянный триггер бот, именно когда стоит галочка в менюхе, в имгуе всё привязано.
Как из этого сурса сделать постоянный триггер бот, именно когда стоит галочка в менюхе, в имгуе всё привязано.
Код:
namespace trigger
{
bool delay = false;
ULONGLONG delay_time = 0;
ULONGLONG delay_between_shots_time = 0;
}
struct target_t
{
int tick;
float fov;
float time; //simulation time
QAngle abs_angles; //target angles
QAngle aim_angles;
int hitbox_id;
std::array<Vector, 4> hitboxes;
Vector velocity;
Vector abs_origin;
c_base_player* entity;
bool is_visible = false;
Vector hitbox;
bool operator<(const target_t& other) const
{
return fov < other.fov;
}
};
int get_hitgroup(const int& hitbox)
{
switch (hitbox)
{
case HITBOX_HEAD:
case HITBOX_NECK:
return 1;
case HITBOX_THORAX:
case HITBOX_LOWER_CHEST:
case HITBOX_UPPER_CHEST:
return 2;
case HITBOX_PELVIS:
case HITBOX_BELLY:
return 3;
case HITBOX_RIGHT_HAND:
case HITBOX_RIGHT_UPPER_ARM:
case HITBOX_RIGHT_FOREARM:
//return 4;
case HITBOX_LEFT_HAND:
case HITBOX_LEFT_UPPER_ARM:
case HITBOX_LEFT_FOREARM:
return 5;
case HITBOX_RIGHT_THIGH:
case HITBOX_RIGHT_CALF:
case HITBOX_RIGHT_FOOT:
//return 6;
case HITBOX_LEFT_THIGH:
case HITBOX_LEFT_CALF:
case HITBOX_LEFT_FOOT:
return 7;
}
return -1;
}
//--------------------------------------------------------------------------------
bool is_suitable_by_min_damage(c_base_player* entity, const int& hitbox, const float& min_damage)
{
if (min_damage <= 1.f || min_damage > 100.f)
return true;
const auto hitgroup = get_hitgroup(hitbox);
if (hitgroup == -1)
{
console::print("hitgroup not found for %d", hitbox);
return false;
}
auto damage = float(weapon_data->iDamage);
autowall::scale_damage(hitgroup, weapon_data->flArmorRatio, entity->m_bHasHelmet(), entity->m_ArmorValue(), damage);
return damage >= min_damage || damage >= entity->m_iHealth();
}
//--------------------------------------------------------------------------------
bool is_time_valid(const float& time)
{
return fabsf(out_delay - (correct_nexttime - time - interpolation_time)) <= 0.2f;
//return fabsf(out_delay - (correct_nexttime - time - interpolation_time)) <= 0.2f;
}
//--------------------------------------------------------------------------------
bool has_rcs()
{
return a_settings.recoil.enabled && interfaces::local_player->m_iShotsFired() > (a_settings.recoil.first_bullet ? 0 : 1);
}
//--------------------------------------------------------------------------------
bool is_trigger()
{
return _is_trigger;
//return !(cmd->buttons & IN_ATTACK) && settings.trigger.enabled;
}
//--------------------------------------------------------------------------------
bool is_enabled(CUserCmd* cmd)
{
_is_trigger = false;
_is_backshot = false;
weapon = interfaces::local_player->m_hActiveWeapon();
if (!weapon || !weapon->IsWeapon())
return false;
if (!weapon->HasBullets() || weapon->IsReloading())
return false;
int index = 0;
if (settings::aimbot::setting_type == settings_type_t::separately)
index = weapon->m_iItemDefinitionIndex();
else if (settings::aimbot::setting_type == settings_type_t::subgroups)
{
switch (weapon->m_iItemDefinitionIndex())
{
case WEAPON_AWP:
case WEAPON_SSG08:
case WEAPON_DEAGLE:
index = 200 + weapon->m_iItemDefinitionIndex();
break;
default:
index = weapon->get_weapon_data()->WeaponType;
}
}
else if (settings::aimbot::setting_type == settings_type_t::groups)
{
int group_index = -1;
for (size_t k = 0; k < settings::aimbot::m_groups.size(); k++)
{
const auto group = settings::aimbot::m_groups[k];
if (std::find(group.weapons.begin(), group.weapons.end(), weapon->m_iItemDefinitionIndex()) != group.weapons.end())
{
group_index = k;
break;
}
}
if (group_index == -1)
return false;
}
a_settings = settings::aimbot::m_items[index];
if (!a_settings.enabled)
return false;
if (!(cmd->buttons & IN_ATTACK))
{
if (globals::binds::back_shot > 0)
_is_backshot = _is_trigger = GetAsyncKeyState(globals::binds::back_shot) & 0x8000;
if (!_is_trigger)
{
if (!a_settings.trigger.enabled)
return false;
if (globals::binds::trigger > 0 && !(GetAsyncKeyState(globals::binds::trigger) & 0x8000))
return false;
_is_trigger = true;
}
}
static int time_in_scope = 0;
if (utils::is_sniper(weapon->m_iItemDefinitionIndex()))
{
if (!interfaces::local_player->m_bIsScoped())
time_in_scope = GetTickCount64();
if (a_settings.check_zoom && time_in_scope + 60 > GetTickCount64())
return false;
}
if (a_settings.fov == 0 && !a_settings.recoil.enabled)
return false;
return true;
}