2023-03-04 11:23:45 +00:00
|
|
|
#include "backend/player_command.hpp"
|
|
|
|
#include "natives.hpp"
|
|
|
|
#include "util/vehicle.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class upgrade_vehicle : player_command
|
|
|
|
{
|
|
|
|
using player_command::player_command;
|
|
|
|
|
2023-08-01 11:10:14 +02:00
|
|
|
virtual void execute(player_ptr player, const command_arguments& _args, const std::shared_ptr<command_context> ctx) override
|
2023-03-04 11:23:45 +00:00
|
|
|
{
|
2023-06-06 07:40:40 +00:00
|
|
|
Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id());
|
|
|
|
Vehicle vehicle = PED::GET_VEHICLE_PED_IS_IN(ped, false);
|
|
|
|
|
|
|
|
if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true))
|
|
|
|
{
|
2024-03-23 00:04:49 +01:00
|
|
|
g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data());
|
2023-06-06 07:40:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
vehicle::max_vehicle(vehicle);
|
|
|
|
}
|
2023-03-04 11:23:45 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-10-20 12:24:44 -04:00
|
|
|
upgrade_vehicle g_upgrade_vehicle("upgradeveh", "MAX_VEHICLE", "BACKEND_UPGRADE_VEHICLE_DESC", 0);
|
2024-03-23 00:04:49 +01:00
|
|
|
}
|