Fixed steal identity. (#357)
This commit is contained in:
parent
64f16206d2
commit
2f92eebb9f
@ -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 }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -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<int*>() = 0;
|
||||
*script_global(262145 + 28074).as<int*>() = 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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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 <imgui_internal.h>
|
||||
@ -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);
|
||||
|
Reference in New Issue
Block a user