-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
enum EAmmoKind : __int32
{
eAK_Bullet = 0x0,
eAK_GrapeShot = 0x1,
eAK_ExplosiveGrenade = 0x2,
eAK_PoisonGrenade = 0x3,
eAK_FlashGrenade = 0x4,
eAK_SmokeGrenade = 0x5,
eAK_EMPGrenade = 0x6,
eAK_ClaymoreExplosive = 0x7,
eAK_C4Explosive = 0x8,
eAK_Medkit = 0x9,
eAK_GLGrenade = 0xA,
eAK_Count = 0xB,
eAK_Default = 0x0,
eAK_Error = 0xB,
};
struct SAmmoParams
{
bool IsGrenade(EAmmoKind kind)
{
return (unsigned int)(kind - 2) <= 4 || kind == 0xB;
}
bool IsPlaceableExplosive(EAmmoKind kind)
{
return (unsigned int)(kind - 7) <= 1;
}
EAmmoKind GetAmmoKind()
{
return v_spoof<EAmmoKind>(this, 0x448 / 8);
}
};
struct CProjectile
{
char pad_0x000[0x40];
SAmmoParams* m_pAmmoParam;
bool IsRemote() {
return *reinterpret_cast<bool*>(this + (0x134));
}
void SetRemote(bool remote) {
return v_spoof<void>(this, 0x134 / 8, remote);
}
bool IsPlaceableExplosive()
{
const SAmmoParams* v1 = this->m_pAmmoParam;
bool result;
if (v1)
{
result = this->m_pAmmoParam->IsPlaceableExplosive(this->m_pAmmoParam->GetAmmoKind());
}
else {
result = this->m_pAmmoParam->IsPlaceableExplosive(eAK_Bullet);
}
return result;
}
bool IsGrenade()
{
const SAmmoParams* v1 = this->m_pAmmoParam;
bool result;
if (v1)
{
result = this->m_pAmmoParam->IsGrenade(this->m_pAmmoParam->GetAmmoKind());
}
else
{
result = this->m_pAmmoParam->IsGrenade(eAK_Bullet);
}
return result;
}
};
struct CWeaponSystem
{
char pad_0x0000[0x00D0]; //0x0000
std::map<unsigned int, CProjectile*> m_projectiles; //0x00D0
};
Последнее редактирование: