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/backend/commands/player/toxic/send_to_warehouse.cpp
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

32 lines
917 B
C++

#include "backend/player_command.hpp"
#include "core/scr_globals.hpp"
#include "natives.hpp"
#include "pointers.hpp"
namespace big
{
class send_to_warehouse : player_command
{
using player_command::player_command;
virtual CommandAccessLevel get_access_level() override
{
return CommandAccessLevel::AGGRESSIVE;
}
virtual void execute(player_ptr player, const command_arguments& _args, const std::shared_ptr<command_context> ctx) override
{
const size_t arg_count = 7;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::TeleportToWarehouse,
self::id,
1 << player->id(),
(int64_t) player->id(),
1,
(int64_t)_args.get<int>(0)};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::TeleportToWarehouse);
}
};
send_to_warehouse g_send_to_warehouse("warehousetp", "TP_TO_WAREHOUSE", "TP_TO_WAREHOUSE_DESC", 1);
}