diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 3de79e2b..3e47e263 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -524,15 +524,6 @@ namespace big this->self.no_ragdoll = j["self"]["no_ragdoll"]; this->self.off_radar = j["self"]["off_radar"]; this->self.super_run = j["self"]["super_run"]; - this->self.proof_bullet = j["self"]["proof_bullet"]; - this->self.proof_fire = j["self"]["proof_fire"]; - this->self.proof_collision = j["self"]["proof_collision"]; - this->self.proof_melee = j["self"]["proof_melee"]; - this->self.proof_explosion = j["self"]["proof_explosion"]; - this->self.proof_steam = j["self"]["proof_steam"]; - this->self.proof_drown = j["self"]["proof_drown"]; - this->self.proof_water = j["self"]["proof_water"]; - this->self.proof_mask = j["self"]["proof_mask"]; this->settings.hotkeys.menu_toggle = j["settings"]["hotkeys"]["menu_toggle"]; @@ -788,16 +779,6 @@ namespace big { "no_ragdoll", this->self.no_ragdoll }, { "off_radar", this->self.off_radar }, { "super_run", this->self.super_run }, - - { "proof_bullet", this->self.proof_bullet }, - { "proof_fire", this->self.proof_fire }, - { "proof_collision", this->self.proof_collision }, - { "proof_melee", this->self.proof_melee }, - { "proof_explosion", this->self.proof_explosion }, - { "proof_steam", this->self.proof_steam }, - { "proof_drown", this->self.proof_drown }, - { "proof_water", this->self.proof_water }, - { "proof_mask", this->self.proof_mask } } }, { diff --git a/BigBaseV2/src/util/player.hpp b/BigBaseV2/src/util/local_player.hpp similarity index 76% rename from BigBaseV2/src/util/player.hpp rename to BigBaseV2/src/util/local_player.hpp index 520c4da3..df7986f0 100644 --- a/BigBaseV2/src/util/player.hpp +++ b/BigBaseV2/src/util/local_player.hpp @@ -1,30 +1,24 @@ -#pragma once -#include "core/data/levels.hpp" -#include "gta/joaat.hpp" -#include "natives.hpp" -#include "script_global.hpp" - -namespace big::player -{ - inline void easy_way_out() - { - *script_global(262145 + 28073).as() = 0; - *script_global(262145 + 28074).as() = 0; - } - - inline void get_active_character_slot(int* character_slot) - { - STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), character_slot, true); - } - - inline std::string get_mp_prefix() - { - get_active_character_slot(&g->player.character_slot); - return "MP" + std::to_string(g->player.character_slot) + "_"; - } - - inline void set_player_level(int level) - { - STATS::STAT_SET_INT(rage::joaat(get_mp_prefix() + "CHAR_SET_RP_GIFT_ADMIN"), levels[level - 1], 0); - } +#pragma once +#include "core/data/levels.hpp" +#include "gta/joaat.hpp" +#include "natives.hpp" +#include "script_global.hpp" + +namespace big::local_player +{ + inline void get_active_character_slot(int* character_slot) + { + STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), character_slot, true); + } + + inline std::string get_mp_prefix() + { + get_active_character_slot(&g->player.character_slot); + return "MP" + std::to_string(g->player.character_slot) + "_"; + } + + inline void set_player_level(int level) + { + STATS::STAT_SET_INT(rage::joaat(get_mp_prefix() + "CHAR_SET_RP_GIFT_ADMIN"), levels[level - 1], 0); + } } \ No newline at end of file diff --git a/BigBaseV2/src/util/ped.hpp b/BigBaseV2/src/util/ped.hpp index 8e534525..d83d8a57 100644 --- a/BigBaseV2/src/util/ped.hpp +++ b/BigBaseV2/src/util/ped.hpp @@ -1,5 +1,6 @@ #pragma once #include "natives.hpp" +#include "script.hpp" namespace big::ped { @@ -25,16 +26,15 @@ namespace big::ped inline void steal_identity(const Ped target) { - Ped ped = self::ped; - - const int max_health = ENTITY::GET_ENTITY_MAX_HEALTH(ped); - const int current_health = ENTITY::GET_ENTITY_HEALTH(ped); - const int current_armor = PED::GET_PED_ARMOUR(ped); + const int max_health = ENTITY::GET_ENTITY_MAX_HEALTH(self::ped); + const int current_health = ENTITY::GET_ENTITY_HEALTH(self::ped); + const int current_armor = PED::GET_PED_ARMOUR(self::ped); PLAYER::SET_PLAYER_MODEL(self::id , ENTITY::GET_ENTITY_MODEL(target)); - PED::CLONE_PED_TO_TARGET(target, ped); - ENTITY::SET_ENTITY_MAX_HEALTH(ped, max_health); - ENTITY::SET_ENTITY_HEALTH(ped, current_health, 0); - PED::SET_PED_ARMOUR(ped, current_armor); + script::get_current()->yield(); + PED::CLONE_PED_TO_TARGET(target, self::ped); + ENTITY::SET_ENTITY_MAX_HEALTH(self::ped, max_health); + ENTITY::SET_ENTITY_HEALTH(self::ped, current_health, 0); + PED::SET_PED_ARMOUR(self::ped, current_armor); } } \ No newline at end of file diff --git a/BigBaseV2/src/views/self/view_self.cpp b/BigBaseV2/src/views/self/view_self.cpp index de9d4615..16d60d33 100644 --- a/BigBaseV2/src/views/self/view_self.cpp +++ b/BigBaseV2/src/views/self/view_self.cpp @@ -1,6 +1,6 @@ #include "fiber_pool.hpp" #include "util/entity.hpp" -#include "util/player.hpp" +#include "util/local_player.hpp" #include "views/view.hpp" #include "services/gta_data/gta_data_service.hpp" #include @@ -23,7 +23,7 @@ namespace big ImGui::SameLine(); components::button("Fill Inventory", [] { - std::string mpPrefix = player::get_mp_prefix(); + std::string mpPrefix = local_player::get_mp_prefix(); STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_YUM_SNACKS"), 30, true); STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_HEALTH_SNACKS"), 15, true); STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_EPIC_SNACKS"), 5, true);