2021-07-23 12:28:17 +02:00
|
|
|
#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()
|
|
|
|
{
|
2022-05-03 09:02:18 -04:00
|
|
|
*script_global(262145 + 28073).as<int*>() = 0;
|
|
|
|
*script_global(262145 + 28074).as<int*>() = 0;
|
2021-07-23 12:28:17 +02:00
|
|
|
}
|
|
|
|
|
2022-07-03 03:45:11 +08:00
|
|
|
inline void get_active_character_slot(int* character_slot)
|
2021-07-23 12:28:17 +02:00
|
|
|
{
|
|
|
|
STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), character_slot, true);
|
|
|
|
}
|
|
|
|
|
2022-07-03 03:45:11 +08:00
|
|
|
inline std::string get_mp_prefix()
|
2021-07-23 12:28:17 +02:00
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
get_active_character_slot(&g->player.character_slot);
|
2022-07-03 03:45:11 +08:00
|
|
|
return "MP" + std::to_string(g->player.character_slot) + "_";
|
|
|
|
}
|
2021-07-23 12:28:17 +02:00
|
|
|
|
2022-07-03 03:45:11 +08:00
|
|
|
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);
|
2021-07-23 12:28:17 +02:00
|
|
|
}
|
|
|
|
}
|