This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/util/local_player.hpp

24 lines
612 B
C++
Raw Normal View History

2022-07-25 04:56:37 +08:00
#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);
}
}