feat: added boat pickup, ballistic armor and keep on ground (#932)
This commit is contained in:
parent
fa7e5e5a34
commit
b87d4e0e1b
29
src/backend/looped/self/request_services.cpp
Normal file
29
src/backend/looped/self/request_services.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "backend/command.hpp"
|
||||
#include "script_global.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class boat_pickup : command
|
||||
{
|
||||
using command::command;
|
||||
|
||||
virtual void execute(const std::vector<std::uint64_t>&, const std::shared_ptr<command_context> ctx)
|
||||
{
|
||||
mobile::merry_weather::request_boat_pickup();
|
||||
}
|
||||
};
|
||||
|
||||
class ballistic_armor : command
|
||||
{
|
||||
using command::command;
|
||||
|
||||
virtual void execute(const std::vector<std::uint64_t>&, const std::shared_ptr<command_context> ctx)
|
||||
{
|
||||
mobile::ceo_abilities::request_ballistic_armor();
|
||||
}
|
||||
};
|
||||
|
||||
boat_pickup g_boat_pickup("boatpickup", "Request Boat Pickup", "Request a boat pickup", 0);
|
||||
ballistic_armor g_ballistic_armor("ballisticarmor", "Request Ballistic Equipment", "Requests ballistic equipment which includes ballistic armor and an minigun", 0);
|
||||
}
|
17
src/backend/looped/vehicle/keep_on_ground.cpp
Normal file
17
src/backend/looped/vehicle/keep_on_ground.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "natives.hpp"
|
||||
#include "backend/looped_command.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class keep_on_ground : looped_command
|
||||
{
|
||||
using looped_command::looped_command;
|
||||
|
||||
virtual void on_tick() override
|
||||
{
|
||||
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(self::veh, 5.0);
|
||||
}
|
||||
};
|
||||
|
||||
keep_on_ground g_keep_on_ground("keeponground", "Keep On Ground", "Makes it so your vehicle is always on the ground on all four wheels", g.vehicle.keep_on_ground);
|
||||
}
|
@ -551,6 +551,7 @@ namespace big
|
||||
bool vehinvisibility = false;
|
||||
bool localveh_visibility = false;
|
||||
bool localped_visibility = true;
|
||||
bool keep_on_ground = false;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(vehicle,
|
||||
speedo_meter, fly, rainbow_paint, speed_unit, god_mode,
|
||||
@ -558,7 +559,7 @@ namespace big
|
||||
auto_drive_destination, auto_drive_style, auto_drive_speed, auto_turn_signals, boost_behavior,
|
||||
drive_on_water, horn_boost, instant_brake, block_homing, seatbelt, turn_signals, vehicle_jump,
|
||||
keep_vehicle_repaired, no_water_collision, disable_engine_auto_start, change_engine_state_immediately,
|
||||
vehinvisibility, localveh_visibility, localped_visibility)
|
||||
vehinvisibility, localveh_visibility, localped_visibility, keep_on_ground)
|
||||
} vehicle{};
|
||||
|
||||
struct weapons
|
||||
|
@ -39,6 +39,11 @@ namespace big::mobile
|
||||
*script_global(scr_globals::mechanic_global).at(886).as<int*>() = 1;
|
||||
}
|
||||
|
||||
inline void request_boat_pickup()
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(887).as<int*>() = 1;
|
||||
}
|
||||
|
||||
inline void request_helicopter_pickup()
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(888).as<int*>() = 1;
|
||||
@ -53,6 +58,8 @@ namespace big::mobile
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(4485).as<int*>() = 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace mors_mutual
|
||||
@ -101,6 +108,11 @@ namespace big::mobile
|
||||
{
|
||||
*script_global(2672505).at(3689).as<int*>() = 1;
|
||||
}
|
||||
|
||||
inline void request_ballistic_armor() //i think this is a ceo ability atleast?
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(896).as<int*>() = 1;
|
||||
}
|
||||
}
|
||||
|
||||
namespace mechanic
|
||||
|
@ -19,6 +19,8 @@ namespace big
|
||||
mobile::merry_weather::request_helicopter_pickup();
|
||||
});
|
||||
|
||||
components::command_button<"boatpickup">();
|
||||
|
||||
components::button("MW_BACKUP_HELI"_T, [] {
|
||||
mobile::merry_weather::request_backup_helicopter();
|
||||
});
|
||||
@ -44,5 +46,6 @@ namespace big
|
||||
mobile::ceo_abilities::request_bullshark_testosterone();
|
||||
});
|
||||
|
||||
components::command_button<"ballisticarmor">();
|
||||
}
|
||||
}
|
@ -97,6 +97,7 @@ namespace big
|
||||
ImGui::Checkbox("FULLY_AUTOMATIC_SIGNAL"_T.data(), &g.vehicle.auto_turn_signals);
|
||||
}
|
||||
components::command_checkbox<"driveunder">();
|
||||
components::command_checkbox<"keeponground">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
Reference in New Issue
Block a user