2022-01-09 01:10:38 +01:00
|
|
|
#pragma once
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "core/scr_globals.hpp"
|
|
|
|
#include "natives.hpp"
|
2022-09-29 20:54:08 +01:00
|
|
|
#include "pointers.hpp"
|
2022-01-09 01:10:38 +01:00
|
|
|
#include "script_global.hpp"
|
|
|
|
|
2023-06-14 21:29:25 +00:00
|
|
|
#include <script/globals/GPBD_FM_3.hpp>
|
|
|
|
#include <script/globals/GlobalPlayerBD.hpp>
|
|
|
|
|
2022-01-09 01:10:38 +01:00
|
|
|
namespace big::globals
|
|
|
|
{
|
2022-05-24 15:59:54 -04:00
|
|
|
inline void clear_wanted_player(Player target)
|
|
|
|
{
|
|
|
|
constexpr size_t arg_count = 3;
|
2023-03-01 21:27:15 +00:00
|
|
|
int64_t args[arg_count] = {static_cast<int64_t>(eRemoteEvent::ClearWantedLevel),
|
|
|
|
self::id,
|
2023-06-14 21:29:25 +00:00
|
|
|
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
|
2022-11-21 15:42:12 +00:00
|
|
|
|
2023-12-13 13:32:26 -05:00
|
|
|
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::ClearWantedLevel);
|
2022-11-21 15:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void give_remote_otr(Player target)
|
|
|
|
{
|
|
|
|
constexpr size_t arg_count = 7;
|
2023-03-01 21:27:15 +00:00
|
|
|
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,
|
2023-06-14 21:29:25 +00:00
|
|
|
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
|
2022-05-24 15:59:54 -04:00
|
|
|
|
2023-12-13 13:32:26 -05:00
|
|
|
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::RemoteOffradar);
|
2022-05-24 15:59:54 -04:00
|
|
|
}
|
2023-01-16 06:14:41 +08:00
|
|
|
|
|
|
|
inline Interior get_interior_from_player(Player player)
|
|
|
|
{
|
2023-06-14 21:29:25 +00:00
|
|
|
return scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[player].CurrentInteriorIndex;
|
2023-01-16 06:14:41 +08:00
|
|
|
}
|
2022-10-26 20:27:15 +02:00
|
|
|
}
|