mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
feat(spawn): Add Spawn Maxed Option (#124)
Co-authored-by: LiamD-Flop <contact@liamd.me>
This commit is contained in:
parent
a2f459fad9
commit
e23153c887
@ -154,6 +154,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
bool preview_vehicle = false;
|
bool preview_vehicle = false;
|
||||||
bool spawn_inside = false;
|
bool spawn_inside = false;
|
||||||
|
bool spawn_maxed = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct spoofing
|
struct spoofing
|
||||||
@ -391,6 +392,7 @@ namespace big
|
|||||||
|
|
||||||
this->spawn.preview_vehicle = j["spawn"]["preview_vehicle"];
|
this->spawn.preview_vehicle = j["spawn"]["preview_vehicle"];
|
||||||
this->spawn.spawn_inside = j["spawn"]["spawn_inside"];
|
this->spawn.spawn_inside = j["spawn"]["spawn_inside"];
|
||||||
|
this->spawn.spawn_maxed = j["spawn"]["spawn_maxed"];
|
||||||
|
|
||||||
this->spoofing.spoof_ip = j["spoofing"]["spoof_ip"];
|
this->spoofing.spoof_ip = j["spoofing"]["spoof_ip"];
|
||||||
this->spoofing.spoof_rockstar_id = j["spoofing"]["spoof_rockstar_id"];
|
this->spoofing.spoof_rockstar_id = j["spoofing"]["spoof_rockstar_id"];
|
||||||
@ -569,7 +571,8 @@ namespace big
|
|||||||
{
|
{
|
||||||
"spawn", {
|
"spawn", {
|
||||||
{ "preview_vehicle", this->spawn.preview_vehicle },
|
{ "preview_vehicle", this->spawn.preview_vehicle },
|
||||||
{ "spawn_inside", this->spawn.spawn_inside }
|
{ "spawn_inside", this->spawn.spawn_inside },
|
||||||
|
{ "spawn_maxed", this->spawn.spawn_maxed}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -84,4 +84,23 @@ namespace big::vehicle
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void telport_into_veh(Vehicle veh)
|
||||||
|
{
|
||||||
|
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), veh, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void max_vehicle(Vehicle veh)
|
||||||
|
{
|
||||||
|
VEHICLE::SET_VEHICLE_MOD_KIT(veh, 0);
|
||||||
|
VEHICLE::TOGGLE_VEHICLE_MOD(veh, 18 /* Turbo */, TRUE);
|
||||||
|
VEHICLE::TOGGLE_VEHICLE_MOD(veh, 20 /* Tire Smoke */, TRUE);
|
||||||
|
VEHICLE::TOGGLE_VEHICLE_MOD(veh, 17 /* Xenon Headlights */, TRUE);
|
||||||
|
VEHICLE::SET_VEHICLE_WINDOW_TINT(veh, 1);
|
||||||
|
for (int i = 0; i < 50; i++)
|
||||||
|
{
|
||||||
|
VEHICLE::SET_VEHICLE_MOD(veh, i, VEHICLE::GET_NUM_VEHICLE_MODS(veh, i) - 1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -19,6 +19,8 @@ namespace big
|
|||||||
ImGui::Checkbox("Preview", &g->spawn.preview_vehicle);
|
ImGui::Checkbox("Preview", &g->spawn.preview_vehicle);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox("Spawn In", &g->spawn.spawn_inside);
|
ImGui::Checkbox("Spawn In", &g->spawn.spawn_inside);
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Checkbox("Spawn Maxed", &g->spawn.spawn_maxed);
|
||||||
|
|
||||||
components::input_text_with_hint("Model Name", "Search", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue, []
|
components::input_text_with_hint("Model Name", "Search", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue, []
|
||||||
{
|
{
|
||||||
@ -27,6 +29,12 @@ namespace big
|
|||||||
|
|
||||||
if (g->spawn.spawn_inside)
|
if (g->spawn.spawn_inside)
|
||||||
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), veh, -1);
|
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), veh, -1);
|
||||||
|
|
||||||
|
if (g->spawn.spawn_maxed)
|
||||||
|
{
|
||||||
|
vehicle::max_vehicle(veh);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
if (ImGui::ListBoxHeader("###vehicles", { ImGui::GetWindowWidth(), ImGui::GetWindowHeight() }))
|
if (ImGui::ListBoxHeader("###vehicles", { ImGui::GetWindowWidth(), ImGui::GetWindowHeight() }))
|
||||||
{
|
{
|
||||||
@ -58,7 +66,15 @@ namespace big
|
|||||||
const Vehicle veh = vehicle::spawn(item["Name"], location, 0.f);
|
const Vehicle veh = vehicle::spawn(item["Name"], location, 0.f);
|
||||||
|
|
||||||
if (g->spawn.spawn_inside)
|
if (g->spawn.spawn_inside)
|
||||||
PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), veh, -1);
|
{
|
||||||
|
vehicle::telport_into_veh(veh);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g->spawn.spawn_maxed)
|
||||||
|
{
|
||||||
|
vehicle::max_vehicle(veh);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (g->spawn.preview_vehicle && ImGui::IsItemHovered())
|
if (g->spawn.preview_vehicle && ImGui::IsItemHovered())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user