Added "Fill Inventory" button. (#309)

This commit is contained in:
aa15032261 2022-07-03 03:45:11 +08:00 committed by GitHub
parent 9363f4797a
commit e987b665c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 12 deletions

View File

@ -17,13 +17,14 @@ namespace big::player
STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), character_slot, true); 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); get_active_character_slot(&g->player.character_slot);
return "MP" + std::to_string(g->player.character_slot) + "_";
}
char level_string[64]; inline void set_player_level(int level)
sprintf(level_string, "MP%d_CHAR_SET_RP_GIFT_ADMIN", g->player.character_slot); {
STATS::STAT_SET_INT(rage::joaat(get_mp_prefix() + "CHAR_SET_RP_GIFT_ADMIN"), levels[level - 1], 0);
STATS::STAT_SET_INT(rage::joaat(level_string), levels[level - 1], 0);
} }
} }

View File

@ -2,8 +2,6 @@
namespace big namespace big
{ {
class player;
class esp class esp
{ {
public: public:

View File

@ -1,5 +1,6 @@
#include "fiber_pool.hpp" #include "fiber_pool.hpp"
#include "util/entity.hpp" #include "util/entity.hpp"
#include "util/player.hpp"
#include "views/view.hpp" #include "views/view.hpp"
namespace big namespace big
@ -18,6 +19,20 @@ namespace big
ImGui::SameLine(); 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", [] { components::button("Skip Cutscene", [] {
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY(); CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
}); });