feat(Self): Added frame flag support
This commit is contained in:
parent
4c2fd7f148
commit
758f0f4e19
@ -69,6 +69,8 @@ namespace big
|
|||||||
inline std::atomic_bool g_running{ true };
|
inline std::atomic_bool g_running{ true };
|
||||||
|
|
||||||
// Global Variables
|
// Global Variables
|
||||||
|
inline CPed* g_local_ped;
|
||||||
|
|
||||||
inline player g_player;
|
inline player g_player;
|
||||||
inline player g_selectedPlayer;
|
inline player g_selectedPlayer;
|
||||||
inline std::unordered_map<Player, player> g_players;
|
inline std::unordered_map<Player, player> g_players;
|
||||||
|
25
BigBaseV2/src/features/looped/self/frame_flags.cpp
Normal file
25
BigBaseV2/src/features/looped/self/frame_flags.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "features/self.hpp"
|
||||||
|
#include "gta/enums.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void self::frame_flags()
|
||||||
|
{
|
||||||
|
if (g_local_ped == nullptr) return;
|
||||||
|
|
||||||
|
uint32_t& flags = g_local_ped->m_player_info->m_frame_flags;
|
||||||
|
auto& frame_flags = g_settings.options["frame_flags"];
|
||||||
|
|
||||||
|
if (frame_flags["explosive_ammo"])
|
||||||
|
flags |= eFrameFlagExplosiveAmmo;
|
||||||
|
|
||||||
|
if (frame_flags["explosive_melee"])
|
||||||
|
flags |= eFrameFlagExplosiveMelee;
|
||||||
|
|
||||||
|
if (frame_flags["fire_ammo"])
|
||||||
|
flags |= eFrameFlagFireAmmo;
|
||||||
|
|
||||||
|
if (frame_flags["super_jump"])
|
||||||
|
flags |= eFrameFlagSuperJump;
|
||||||
|
}
|
||||||
|
}
|
@ -11,9 +11,7 @@ namespace big
|
|||||||
|
|
||||||
if (bGodMode || (!bGodMode && bGodMode != bLastGodMode))
|
if (bGodMode || (!bGodMode && bGodMode != bLastGodMode))
|
||||||
{
|
{
|
||||||
CPed* ped = gta_util::get_local_ped();
|
g_local_ped->m_godmode = bGodMode ? 0x1 : 0x0;
|
||||||
|
|
||||||
ped->m_godmode = bGodMode ? 0x1 : 0x0;
|
|
||||||
|
|
||||||
//ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), bGodMode);
|
//ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player.id), bGodMode);
|
||||||
|
|
||||||
|
@ -8,12 +8,12 @@ namespace big
|
|||||||
|
|
||||||
void vehicle::handling()
|
void vehicle::handling()
|
||||||
{
|
{
|
||||||
CPed* ped = gta_util::get_local_ped();
|
if (g_local_ped == nullptr) return;
|
||||||
|
|
||||||
g_temp.in_vehicle = ped->m_in_vehicle == 0;
|
g_temp.in_vehicle = g_local_ped->m_in_vehicle == 0;
|
||||||
|
|
||||||
if (g_temp.in_vehicle)
|
if (g_temp.in_vehicle)
|
||||||
g_vehicle = ped->m_vehicle;
|
g_vehicle = g_local_ped->m_vehicle;
|
||||||
else
|
else
|
||||||
g_vehicle = nullptr;
|
g_vehicle = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "self.hpp"
|
#include "self.hpp"
|
||||||
#include "fiber_pool.hpp"
|
#include "fiber_pool.hpp"
|
||||||
|
#include "gta_util.hpp"
|
||||||
#include "script.hpp"
|
#include "script.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
@ -8,6 +9,8 @@ namespace big
|
|||||||
|
|
||||||
void self::loop()
|
void self::loop()
|
||||||
{
|
{
|
||||||
|
g_local_ped = gta_util::get_local_ped();
|
||||||
|
|
||||||
if (busy) return;
|
if (busy) return;
|
||||||
busy = true;
|
busy = true;
|
||||||
|
|
||||||
@ -19,6 +22,7 @@ namespace big
|
|||||||
noclip();
|
noclip();
|
||||||
off_radar();
|
off_radar();
|
||||||
spoof_rank();
|
spoof_rank();
|
||||||
|
frame_flags();
|
||||||
super_sprint();
|
super_sprint();
|
||||||
|
|
||||||
busy = false;
|
busy = false;
|
||||||
|
@ -16,6 +16,7 @@ namespace big
|
|||||||
static void off_radar();
|
static void off_radar();
|
||||||
static void spoof_rank();
|
static void spoof_rank();
|
||||||
static void super_sprint();
|
static void super_sprint();
|
||||||
|
static void frame_flags();
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -26,6 +26,18 @@ namespace big
|
|||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
if (ImGui::TreeNode("Frame Flags"))
|
||||||
|
{
|
||||||
|
auto& frame_flags = g_settings.options["frame_flags"];
|
||||||
|
|
||||||
|
ImGui::Checkbox("Explosive Ammo", frame_flags["explosive_ammo"].get<bool*>());
|
||||||
|
ImGui::Checkbox("Explosive Melee", frame_flags["explosive_melee"].get<bool*>());
|
||||||
|
ImGui::Checkbox("Fire Ammo", frame_flags["fire_ammo"].get<bool*>());
|
||||||
|
ImGui::Checkbox("Super Jump", frame_flags["super_jump"].get<bool*>());
|
||||||
|
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::TreeNode("No Clip"))
|
if (ImGui::TreeNode("No Clip"))
|
||||||
{
|
{
|
||||||
if (ImGui::Checkbox("No Clip", g_settings.options["noclip"]["enabled"].get<bool*>()))
|
if (ImGui::Checkbox("No Clip", g_settings.options["noclip"]["enabled"].get<bool*>()))
|
||||||
@ -39,7 +51,6 @@ namespace big
|
|||||||
|
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>()))
|
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>()) || ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>()))
|
||||||
g_settings.save();
|
g_settings.save();
|
||||||
|
@ -20,6 +20,12 @@ namespace big
|
|||||||
},
|
},
|
||||||
"disable_phone": false,
|
"disable_phone": false,
|
||||||
"disable_chat_censoring": false,
|
"disable_chat_censoring": false,
|
||||||
|
"frame_flags": {
|
||||||
|
"explosive_ammo": false,
|
||||||
|
"explosive_melee": false,
|
||||||
|
"fire_ammo": false,
|
||||||
|
"super_jump": false
|
||||||
|
},
|
||||||
"god_mode": false,
|
"god_mode": false,
|
||||||
"join_message": false,
|
"join_message": false,
|
||||||
"never_wanted": false,
|
"never_wanted": false,
|
||||||
|
Reference in New Issue
Block a user