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
gir489 695a6dd20e
Fixes for b3095 (#2537)
* Refactored TRIGGER_SCRIPT_EVENT for the duplicate f_2 argument they added in 3095.
Fixed OOB gadget spam caused by the tow truck.
Increased max interiors in InteriorControl.
* Updated scripted_game_event.
* Update GTAV-Classes repo.
* Fixed locals for 3095.
* Bump project to Build 3095.
2023-12-14 00:56:40 +01:00

42 lines
1.3 KiB
C++

#pragma once
#include "core/scr_globals.hpp"
#include "natives.hpp"
#include "pointers.hpp"
#include "script_global.hpp"
#include <script/globals/GPBD_FM_3.hpp>
#include <script/globals/GlobalPlayerBD.hpp>
namespace big::globals
{
inline void clear_wanted_player(Player target)
{
constexpr size_t arg_count = 4;
int64_t args[arg_count] = {static_cast<int64_t>(eRemoteEvent::ClearWantedLevel),
self::id, 1 << target,
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::ClearWantedLevel);
}
inline void give_remote_otr(Player target)
{
constexpr size_t arg_count = 8;
int64_t args[arg_count] = {static_cast<int64_t>(eRemoteEvent::RemoteOffradar),
(int64_t)self::id,
1 << target,
(int64_t)(NETWORK::GET_NETWORK_TIME() + 1),
0,
true,
false,
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::RemoteOffradar);
}
inline Interior get_interior_from_player(Player player)
{
return scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[player].CurrentInteriorIndex;
}
}