Added "Fill Inventory" button. (#309)
This commit is contained in:
parent
9363f4797a
commit
e987b665c2
@ -12,18 +12,19 @@ namespace big::player
|
||||
*script_global(262145 + 28074).as<int*>() = 0;
|
||||
}
|
||||
|
||||
inline void get_active_character_slot(int *character_slot)
|
||||
inline void get_active_character_slot(int* character_slot)
|
||||
{
|
||||
STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), character_slot, true);
|
||||
}
|
||||
|
||||
inline void set_player_level(int level)
|
||||
inline std::string get_mp_prefix()
|
||||
{
|
||||
get_active_character_slot(&g->player.character_slot);
|
||||
return "MP" + std::to_string(g->player.character_slot) + "_";
|
||||
}
|
||||
|
||||
char level_string[64];
|
||||
sprintf(level_string, "MP%d_CHAR_SET_RP_GIFT_ADMIN", g->player.character_slot);
|
||||
|
||||
STATS::STAT_SET_INT(rage::joaat(level_string), levels[level - 1], 0);
|
||||
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);
|
||||
}
|
||||
}
|
@ -2,8 +2,6 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
class player;
|
||||
|
||||
class esp
|
||||
{
|
||||
public:
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/player.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
@ -7,20 +8,34 @@ namespace big
|
||||
void view::self() {
|
||||
components::button("Suicide", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0);
|
||||
});
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Heal", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, PED::GET_PED_MAX_HEALTH(self::ped), 0);
|
||||
PED::SET_PED_ARMOUR(self::ped, PLAYER::GET_PLAYER_MAX_ARMOUR(self::id));
|
||||
});
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Fill Inventory", [] {
|
||||
std::string mpPrefix = 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);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_1_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_2_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_3_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_4_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_5_COUNT"), 10, true);
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Skip Cutscene", [] {
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
});
|
||||
});
|
||||
|
||||
static char model[32];
|
||||
components::input_text_with_hint("Model Name###player_ped_model", "Player Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue, [] {
|
||||
@ -42,8 +57,8 @@ namespace big
|
||||
PED::SET_PED_DEFAULT_COMPONENT_VARIATION(self::ped);
|
||||
script::get_current()->yield();
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
|
Reference in New Issue
Block a user