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/globals.hpp

37 lines
933 B
C++
Raw Normal View History

#pragma once
#include "pointers.hpp"
#include "script_global.hpp"
2022-11-21 15:42:12 +00:00
#include "natives.hpp"
#include "core/scr_globals.hpp"
namespace big::globals
{
2022-05-24 15:59:54 -04:00
inline void clear_wanted_player(Player target)
{
constexpr size_t arg_count = 3;
int64_t args[arg_count] = {
static_cast<int64_t>(eRemoteEvent::ClearWantedLevel),
self::id,
2022-11-21 15:42:12 +00:00
*scr_globals::gpbd_fm_3.at(target, scr_globals::size::gpbd_fm_3).at(510).as<int*>()
};
g_pointers->m_trigger_script_event(1, args, arg_count, 1 << target);
}
inline void give_remote_otr(Player target)
{
constexpr size_t arg_count = 7;
int64_t args[arg_count] = {
static_cast<int64_t>(eRemoteEvent::RemoteOffradar),
(int64_t)self::id,
(int64_t)(NETWORK::GET_NETWORK_TIME() + 1),
0,
true,
false,
*scr_globals::gpbd_fm_3.at(target, scr_globals::size::gpbd_fm_3).at(510).as<int64_t*>()
2022-05-24 15:59:54 -04:00
};
g_pointers->m_trigger_script_event(1, args, arg_count, 1 << target);
}
}