Пхахаха. Смещение одного из оффсетов - и нет автошота у алион хака.
int32 is_trigger_id()
{
int32 u = *(int32*)((int64)this + (0x18));
u = *(int32*)((int64)u + (0x60));
u = *(int32*)((int64)u + (0x20));
return (int32) * (int64*)((int64)u + (0x170));
}
{
public:
EntityId GetTriggeredID()
{
DWORD64 offset_0 = *(DWORD64*)(DWORD64(this + 0x18));
if (!offset_0) return 0;
DWORD64 offset_1 = *(DWORD64*)(DWORD64(offset_0 + 0x60));
if (!offset_1) return 0;
DWORD64 offset_2 = *(DWORD64*)(DWORD64(offset_1 + 0x20));
if (!offset_2) return 0;
return *(EntityId*)(DWORD64(offset_2 + 0x170));
}
IItem* GetCurrentItem(bool includeVehicle = false)
{
return Function<IItem * (__thiscall*)(PVOID, bool)>(this, don`t paste)(this, includeVehicle); //Strings -> CurrentItemName
}
}
class IItem
{
public:
IWeapon* GetIWeapon()
{
return Function<IWeapon * (__thiscall*)(PVOID)>(this, don`t paste)(this);//OffHand (offset in return of last 'if' is GetIWeapon)
}
}
class IWeapon
{
public:
void StartFire() { return Function<void(__thiscall*)(PVOID)>(this, 11)(this); } //CScriptBind_Weapon::AutoShoot (first)
void StopFire() { return Function<void(__thiscall*)(PVOID)>(this, 12)(this); } //CScriptBind_Weapon::AutoShoot (second)
}
if (auto mWeapon = m_pActor->GetCurrentItem()->GetIWeapon())
{
auto mTriggerId = m_pActor->GetTriggeredID();
if (mTriggerId && GetAsyncKeyState(VK_RBUTTON))
{
if (IActor * pActor = meFramework->GetIActorSystem()->GetActor(mTriggerId))
{
if (IsMyTeam(m_pActor, pActor)) { continue; }
// here
mWeapon->StartFire();
// and here
mWeapon->StopFire();
}
}
}