2022-12-22 21:23:32 +00:00
|
|
|
#include "backend/player_command.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "core/scr_globals.hpp"
|
2022-12-22 21:23:32 +00:00
|
|
|
#include "natives.hpp"
|
|
|
|
#include "pointers.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class send_to_warehouse : player_command
|
|
|
|
{
|
|
|
|
using player_command::player_command;
|
|
|
|
|
|
|
|
virtual CommandAccessLevel get_access_level()
|
|
|
|
{
|
|
|
|
return CommandAccessLevel::AGGRESSIVE;
|
|
|
|
}
|
|
|
|
|
2023-07-26 22:22:40 +02:00
|
|
|
virtual void execute(player_ptr player, const command_arguments& _args, const std::shared_ptr<command_context> ctx)
|
2022-12-22 21:23:32 +00:00
|
|
|
{
|
|
|
|
const size_t arg_count = 6;
|
2023-07-26 22:22:40 +02:00
|
|
|
int64_t args[arg_count] = {(int64_t)eRemoteEvent::TeleportToWarehouse, self::id, (int64_t)player->id(), 1, (int64_t)_args.get<int>(0)};
|
2022-12-22 21:23:32 +00:00
|
|
|
|
2023-04-14 18:54:07 +02:00
|
|
|
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
|
2022-12-22 21:23:32 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-06-06 07:40:40 +00:00
|
|
|
send_to_warehouse g_send_to_warehouse("warehousetp", "TP_TO_WAREHOUSE", "TP_TO_WAREHOUSE_DESC", 1);
|
2022-12-22 21:23:32 +00:00
|
|
|
}
|