2023-03-04 11:23:45 +00:00
|
|
|
#include "backend/player_command.hpp"
|
|
|
|
#include "natives.hpp"
|
|
|
|
#include "pointers.hpp"
|
|
|
|
#include "util/teleport.hpp"
|
|
|
|
#include "util/vehicle.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class black_tint : player_command
|
|
|
|
{
|
|
|
|
using player_command::player_command;
|
|
|
|
|
2023-07-20 22:46:32 +02:00
|
|
|
virtual void execute(player_ptr player, const std::vector<uint64_t>& _args, const std::shared_ptr<command_context> ctx)
|
2023-03-04 11:23:45 +00:00
|
|
|
{
|
|
|
|
Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id());
|
2023-06-06 07:40:40 +00:00
|
|
|
|
2023-03-04 11:23:45 +00:00
|
|
|
if (PED::IS_PED_IN_ANY_VEHICLE(ped, false))
|
|
|
|
{
|
2023-06-06 07:40:40 +00:00
|
|
|
Vehicle vehicle = PED::GET_VEHICLE_PED_IS_IN(ped, false);
|
2023-03-04 11:23:45 +00:00
|
|
|
|
2023-06-06 07:40:40 +00:00
|
|
|
if (entity::take_control_of(vehicle))
|
|
|
|
VEHICLE::SET_VEHICLE_WINDOW_TINT(vehicle, WINDOWTINT_BLACK);
|
2023-03-04 11:23:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
black_tint g_black_tint("blacktint", "Black Window Tint", "Makes their windows black.", 0);
|
|
|
|
}
|