feat(Self): Added frame flag cheats
This commit is contained in:
parent
e664c3cd2b
commit
a61ba85278
32
BigBaseV2/src/backend/looped/self/frame_flags.cpp
Normal file
32
BigBaseV2/src/backend/looped/self/frame_flags.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "core/enums.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
enum eFrameFlags : std::uint32_t
|
||||
{
|
||||
eFrameFlagExplosiveAmmo = 1 << 3,
|
||||
eFrameFlagFireAmmo = 1 << 4,
|
||||
eFrameFlagExplosiveMelee = 1 << 5,
|
||||
eFrameFlagSuperJump = 1 << 6,
|
||||
};
|
||||
|
||||
void looped::self_frame_flags()
|
||||
{
|
||||
if (g_local_player == nullptr) return;
|
||||
|
||||
uint32_t& flags = g_local_player->m_player_info->m_frame_flags;
|
||||
|
||||
if (g.self.frame_flags.explosive_ammo)
|
||||
flags |= eFrameFlagExplosiveAmmo;
|
||||
|
||||
if (g.self.frame_flags.explosive_melee)
|
||||
flags |= eFrameFlagExplosiveMelee;
|
||||
|
||||
if (g.self.frame_flags.fire_ammo)
|
||||
flags |= eFrameFlagFireAmmo;
|
||||
|
||||
if (g.self.frame_flags.super_jump)
|
||||
flags |= eFrameFlagSuperJump;
|
||||
}
|
||||
}
|
@ -42,10 +42,19 @@ struct globals {
|
||||
};
|
||||
|
||||
struct self {
|
||||
struct frame_flags {
|
||||
bool explosive_ammo = false;
|
||||
bool explosive_melee = false;
|
||||
bool fire_ammo = false;
|
||||
bool super_jump = false;
|
||||
};
|
||||
|
||||
bool godmode = false;
|
||||
bool off_radar = false;
|
||||
bool noclip = false;
|
||||
bool no_ragdoll = false;
|
||||
|
||||
frame_flags frame_flags{};
|
||||
};
|
||||
|
||||
struct vehicle {
|
||||
@ -109,6 +118,11 @@ struct globals {
|
||||
this->self.off_radar = j["self"]["off_radar"];
|
||||
this->self.no_ragdoll = j["self"]["no_ragdoll"];
|
||||
|
||||
this->self.frame_flags.explosive_ammo = j["self"]["frame_flags"]["explosive_ammo"];
|
||||
this->self.frame_flags.explosive_melee = j["self"]["frame_flags"]["explosive_melee"];
|
||||
this->self.frame_flags.fire_ammo = j["self"]["frame_flags"]["fire_ammo"];
|
||||
this->self.frame_flags.super_jump = j["self"]["frame_flags"]["super_jump"];
|
||||
|
||||
this->vehicle.horn_boost = j["vehicle"]["horn_boost"];
|
||||
this->vehicle.speedo_meter = (SpeedoMeter)j["vehicle"]["speedo_meter"];
|
||||
|
||||
@ -154,7 +168,16 @@ struct globals {
|
||||
"self", {
|
||||
{ "godmode", this->self.godmode },
|
||||
{ "off_radar", this->self.off_radar },
|
||||
{ "no_ragdoll", this->self.no_ragdoll }
|
||||
{ "no_ragdoll", this->self.no_ragdoll },
|
||||
|
||||
{
|
||||
"frame_flags", {
|
||||
{ "explosive_ammo", this->self.frame_flags.explosive_ammo },
|
||||
{ "explosive_melee", this->self.frame_flags.explosive_melee },
|
||||
{ "fire_ammo", this->self.frame_flags.fire_ammo },
|
||||
{ "super_jump", this->self.frame_flags.super_jump }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "script_global.hpp"
|
||||
#include "util/player.hpp"
|
||||
|
||||
@ -8,15 +10,12 @@ namespace big
|
||||
{
|
||||
if (ImGui::BeginTabItem("Self"))
|
||||
{
|
||||
if (ImGui::Button("Easy Way Out"))
|
||||
{
|
||||
*script_global(262145 + 27907).as<int*>() = 0;
|
||||
*script_global(262145 + 27908).as<int*>() = 0;
|
||||
}
|
||||
|
||||
if (ImGui::Button("Suicide"))
|
||||
{
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::PLAYER_PED_ID(), 0, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::Checkbox("God Mode", &g.self.godmode);
|
||||
@ -24,6 +23,19 @@ namespace big
|
||||
ImGui::Checkbox("No Clip", &g.self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g.self.no_ragdoll);
|
||||
|
||||
if (ImGui::TreeNode("Frame Flags"))
|
||||
{
|
||||
ImGui::Checkbox("Explosive Ammo", &g.self.frame_flags.explosive_ammo);
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Fire Ammo", &g.self.frame_flags.fire_ammo);
|
||||
|
||||
ImGui::Checkbox("Explosive Melee", &g.self.frame_flags.explosive_melee);
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Super Jump", &g.self.frame_flags.super_jump);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user