mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-01 12:02:55 +08:00
Commands (#725)
* feat(Commands): Prototype command system * feat(Commands): Chat commands * refactor(Toxic): convert most options into commands * feat(Protections): block breakup kicks on other players as host * refactor(Kicks): convert most options into commands * refactor(Commands): add labels and descriptions to all commands * feat(Commands): cleanup on unload * refactor(Troll): convert most options into commands * refactor(Misc): convert most options into commands * refactor(Teleport): convert most options into commands * feat(Commands): Variadic commands and toggleable bools * feat(Hotkeys): hotkeys now use commands * fix(Chat): fix the chat window locking up when a message is sent * fix(Commands): properly handle spoofed username * fix(Spam): update filter Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -19,7 +20,13 @@ namespace big
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.69f, 0.29f, 0.29f, 1.00f));
|
||||
if (components::nav_button("Unload"))
|
||||
{
|
||||
g_running = false;
|
||||
g_fiber_pool->queue_job([]
|
||||
{
|
||||
for (auto& command : g_looped_commands)
|
||||
command->on_disable();
|
||||
|
||||
g_running = false;
|
||||
});
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "services/api/api_service.hpp"
|
||||
#include "core/data/block_join_reasons.hpp"
|
||||
#include "core/data/infractions.hpp"
|
||||
#include "core/data/command_access_levels.hpp"
|
||||
#include "util/session.hpp"
|
||||
|
||||
namespace big
|
||||
@ -94,6 +95,24 @@ namespace big
|
||||
ImGui::SetTooltip("Only works as host");
|
||||
|
||||
|
||||
if (ImGui::BeginCombo("Chat Command Permissions", COMMAND_ACCESS_LEVELS[current_player.command_access_level.value_or(g.session.chat_command_default_access_level)]))
|
||||
{
|
||||
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)
|
||||
{
|
||||
if (ImGui::Selectable(name, type == current_player.command_access_level.value_or(g.session.chat_command_default_access_level)))
|
||||
{
|
||||
current_player.command_access_level = type;
|
||||
}
|
||||
|
||||
if (type == current_player.command_access_level.value_or(g.session.chat_command_default_access_level))
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (!current_player.infractions.empty())
|
||||
{
|
||||
ImGui::Text("Infractions:");
|
||||
|
@ -8,7 +8,9 @@
|
||||
#include "util/toxic.hpp"
|
||||
#include "core/data/apartment_names.hpp"
|
||||
#include "core/data/warehouse_names.hpp"
|
||||
#include "core/data/command_access_levels.hpp"
|
||||
#include <network/Network.hpp>
|
||||
#include "hooking.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -93,13 +95,35 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
components::button("Send", []
|
||||
{
|
||||
if(const auto net_game_player = gta_util::get_network_player_mgr()->m_local_net_player; net_game_player)
|
||||
if (const auto net_game_player = gta_util::get_network_player_mgr()->m_local_net_player; net_game_player)
|
||||
{
|
||||
if(g_pointers->m_send_chat_message(*g_pointers->m_send_chat_ptr, net_game_player->get_net_data(), msg, g.session.is_team))
|
||||
if (g_hooking->get_original<hooks::send_chat_message>()(*g_pointers->m_send_chat_ptr, net_game_player->get_net_data(), msg, g.session.is_team))
|
||||
notify::draw_chat(msg, net_game_player->get_name(), g.session.is_team);
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::Checkbox("Chat Commands", &g.session.chat_commands);
|
||||
if (g.session.chat_commands)
|
||||
{
|
||||
if (ImGui::BeginCombo("Default Command Permissions", COMMAND_ACCESS_LEVELS[g.session.chat_command_default_access_level]))
|
||||
{
|
||||
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)
|
||||
{
|
||||
if (ImGui::Selectable(name, type == g.session.chat_command_default_access_level))
|
||||
{
|
||||
g.session.chat_command_default_access_level = type;
|
||||
}
|
||||
|
||||
if (type == g.session.chat_command_default_access_level)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
}
|
||||
|
||||
components::sub_title("Decloak");
|
||||
components::script_patch_checkbox("Reveal OTR Players", &g.session.decloak_players);
|
||||
|
||||
@ -175,25 +199,25 @@ namespace big
|
||||
*scr_globals::globalplayer_bd.at(self::id, scr_globals::size::globalplayer_bd).at(213).as<int*>() = global_wanted_level;
|
||||
}
|
||||
|
||||
components::button("Kill Everyone", [] { g_player_service->iterate([](auto& plyr) { toxic::kill_player(plyr.second, g_player_service->get_self()); }); });
|
||||
components::command_button<"killall">({ }, "Kill Everyone");
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Turn Everyone Into Beast", [] { toxic::turn_everyone_into_beast(); });
|
||||
|
||||
components::command_button<"beastall">({ });
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Including you");
|
||||
|
||||
components::button("Give All Weapons", [] { g_player_service->iterate([](auto& plyr) { toxic::give_all_weapons(plyr.second); script::get_current()->yield(450ms); }); });
|
||||
components::command_button<"giveweapsall">({ });
|
||||
ImGui::SameLine();
|
||||
components::button("Remove All Weapons", [] { g_player_service->iterate([](auto& plyr) { toxic::remove_all_weapons(plyr.second); }); });
|
||||
components::command_button<"remweapsall">({ });
|
||||
|
||||
components::button("CEO Kick", [] {
|
||||
g_player_service->iterate([](auto& plyr)
|
||||
{
|
||||
if (*scr_globals::gpbd_fm_3.at(plyr.second->id(), scr_globals::size::gpbd_fm_3).at(10).as<int*>() != -1)
|
||||
toxic::ceo_kick(plyr.second);
|
||||
});
|
||||
});
|
||||
components::command_button<"ceokickall">( { });
|
||||
ImGui::SameLine();
|
||||
components::command_button<"vehkickall">({ });
|
||||
|
||||
components::command_button<"ragdollall">({ }, "Ragdoll Players");
|
||||
components::command_button<"intkickall">({ }, "Kick Everyone From Interiors");
|
||||
|
||||
components::small_text("Teleports");
|
||||
|
||||
@ -217,7 +241,7 @@ namespace big
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("TP All To Apartment", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_apartment(plyr.second, g.session.send_to_apartment_idx); }); });
|
||||
components::command_button<"apartmenttpall">({ (uint64_t)g.session.send_to_apartment_idx }, "TP All To Apartment");
|
||||
|
||||
if (ImGui::BeginCombo("##warehouse", warehouse_names[g.session.send_to_warehouse_idx]))
|
||||
{
|
||||
@ -239,7 +263,7 @@ namespace big
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("TP All To Warehouse", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_warehouse(plyr.second, g.session.send_to_warehouse_idx); }); });
|
||||
components::command_button<"warehousetpall">({ (uint64_t)g.session.send_to_warehouse_idx }, "TP All To Warehouse");
|
||||
|
||||
components::button("TP All To Darts", [] { g_player_service->iterate([](auto& plyr) { toxic::start_activity(plyr.second, eActivityType::Darts); }); });
|
||||
ImGui::SameLine();
|
||||
@ -249,27 +273,25 @@ namespace big
|
||||
|
||||
components::button("TP All To Skydive", [] { g_player_service->iterate([](auto& plyr) { toxic::start_activity(plyr.second, eActivityType::Skydive); }); });
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Cayo Perico", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_island(plyr.second); }); });
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To MOC", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 81); }); });
|
||||
components::command_button<"interiortpall">({ 81 }, "TP All To MOC");
|
||||
|
||||
components::button("TP All To Casino", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 123); }); });
|
||||
components::command_button<"interiortpall">({ 123 }, "TP All To Casino");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Penthouse", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 124); }); });
|
||||
components::command_button<"interiortpall">({ 124 }, "TP All To Penthouse");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Arcade", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 128); }); });
|
||||
components::command_button<"interiortpall">({ 128 }, "TP All To Arcade");
|
||||
|
||||
components::button("TP All To Music Locker", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 146); }); });
|
||||
components::command_button<"interiortpall">({ 146 }, "TP All To Music Locker");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Record A Studios", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 148); }); });
|
||||
components::command_button<"interiortpall">({ 148 }, "TP All To Record A Studios");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Custom Auto Shop", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 149); }); });
|
||||
components::command_button<"interiortpall">({ 149 }, "TP All To Custom Auto Shop");
|
||||
|
||||
components::button("TP All To Agency", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 155); }); });
|
||||
components::command_button<"interiortpall">({ 155 }, "TP All To Agency");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Freakshop", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 160); }); });
|
||||
components::command_button<"interiortpall">({ 160 }, "TP All To Freakshop");
|
||||
ImGui::SameLine();
|
||||
components::button("TP All To Multi-Floor Garage", [] { g_player_service->iterate([](auto& plyr) { toxic::send_player_to_interior(plyr.second, 161); }); });
|
||||
components::command_button<"interiortpall">({ 161 }, "TP All To Multi Floor Garage");
|
||||
|
||||
components::sub_title("Event Starter");
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "views/view.hpp"
|
||||
#include "services/player_database/player_database_service.hpp"
|
||||
#include "core/data/command_access_levels.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -118,6 +119,26 @@ namespace big
|
||||
net_player_data->m_external_port).data());
|
||||
}
|
||||
|
||||
if (ImGui::BeginCombo("Chat Command Permissions", COMMAND_ACCESS_LEVELS[g_player_service->get_selected()->command_access_level.value_or(g.session.chat_command_default_access_level)]))
|
||||
{
|
||||
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)
|
||||
{
|
||||
if (ImGui::Selectable(name, type == g_player_service->get_selected()->command_access_level.value_or(g.session.chat_command_default_access_level)))
|
||||
{
|
||||
g.session.chat_command_default_access_level = type;
|
||||
g_player_database_service->get_or_create_player(g_player_service->get_selected())->command_access_level = type;
|
||||
g_player_database_service->save();
|
||||
}
|
||||
|
||||
if (type == g_player_service->get_selected()->command_access_level.value_or(g.session.chat_command_default_access_level))
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (ImGui::Button("Add To Database"))
|
||||
{
|
||||
g_player_database_service->get_or_create_player(g_player_service->get_selected());
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "views/view.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include "util/toxic.hpp"
|
||||
#include "util/kick.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -9,17 +8,17 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode("Kick"))
|
||||
{
|
||||
components::button("Breakup Kick", [] { kick::breakup_kick(g_player_service->get_selected()); });
|
||||
components::button("Lost Connection Kick", [] { kick::lost_connection_kick(g_player_service->get_selected()); });
|
||||
components::button("Bail Kick", [] { kick::bail_kick(g_player_service->get_selected()); });
|
||||
components::button("Null Function Kick", [] { kick::null_function_kick(g_player_service->get_selected()); });
|
||||
components::button("OOM Kick", [] { kick::oom_kick(g_player_service->get_selected()); });
|
||||
components::button("Script Host Kick", [] { kick::kick_player_script_host(g_player_service->get_selected()); });
|
||||
components::button("End Session Kick", [] { kick::end_session_kick(g_player_service->get_selected()); });
|
||||
components::player_command_button<"breakup">(g_player_service->get_selected());
|
||||
components::player_command_button<"lckick">(g_player_service->get_selected());
|
||||
components::player_command_button<"bailkick">(g_player_service->get_selected());
|
||||
components::player_command_button<"nfkick">(g_player_service->get_selected());
|
||||
components::player_command_button<"oomkick">(g_player_service->get_selected());
|
||||
components::player_command_button<"shkick">(g_player_service->get_selected());
|
||||
components::player_command_button<"endkick">(g_player_service->get_selected());
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("The kick can take around 10 seconds to work");
|
||||
components::button("Host Kick", [] { kick::host_kick(g_player_service->get_selected()); });
|
||||
components::button("Complaint Kick", [] { kick::complaint_kick(g_player_service->get_selected()); });
|
||||
components::player_command_button<"hostkick">(g_player_service->get_selected());
|
||||
components::player_command_button<"desync">(g_player_service->get_selected());
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("The kick can take around 10 seconds to work");
|
||||
|
||||
|
@ -16,55 +16,18 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode("Misc"))
|
||||
{
|
||||
components::button("Join CEO/MC", []
|
||||
{
|
||||
scr_functions::join_ceo({ g_player_service->get_selected()->id(), 0, false, false });
|
||||
});
|
||||
|
||||
components::button("Enter Interior", []
|
||||
{
|
||||
session::enter_player_interior(g_player_service->get_selected());
|
||||
});
|
||||
|
||||
components::button("Steal Outfit", []
|
||||
{
|
||||
ped::steal_outfit(
|
||||
PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id())
|
||||
);
|
||||
});
|
||||
|
||||
components::player_command_button<"joinceo">(g_player_service->get_selected());
|
||||
components::player_command_button<"enterint">(g_player_service->get_selected());
|
||||
components::player_command_button<"copyoutfit">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Steal Identity", []
|
||||
{
|
||||
ped::steal_identity(
|
||||
PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id())
|
||||
);
|
||||
});
|
||||
|
||||
components::button("Clear Wanted Level", []
|
||||
{
|
||||
globals::clear_wanted_player(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
components::player_command_button<"copymodel">(g_player_service->get_selected());
|
||||
components::player_command_button<"clearwanted">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Give Health", []
|
||||
{
|
||||
g_pickup_service->give_player_health(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
components::player_command_button<"givehealth">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Give Armour", []
|
||||
{
|
||||
g_pickup_service->give_player_armour(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
components::button("Give Ammo", []
|
||||
{
|
||||
g_pickup_service->give_player_ammo(g_player_service->get_selected()->id());
|
||||
});
|
||||
components::player_command_button<"givearmor">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"giveammo">(g_player_service->get_selected());
|
||||
|
||||
ImGui::Checkbox("Off The Radar", &g_player_service->get_selected()->off_radar);
|
||||
ImGui::Checkbox("Never Wanted", &g_player_service->get_selected()->never_wanted);
|
||||
|
@ -10,24 +10,21 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode("Toxic"))
|
||||
{
|
||||
components::button("Kill Player", []
|
||||
{
|
||||
toxic::kill_player(g_player_service->get_selected(), g_player_service->get_self());
|
||||
});
|
||||
components::player_command_button<"kill">(g_player_service->get_selected(), {});
|
||||
|
||||
components::button("CEO Kick", [] { toxic::ceo_kick(g_player_service->get_selected()); });
|
||||
|
||||
components::button("Kick From Vehicle", [] { toxic::kick_player_from_vehicle(g_player_service->get_selected()); });
|
||||
components::player_command_button<"ceokick">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::button("Ragdoll Player", [] { toxic::ragdoll_player(g_player_service->get_selected()); });
|
||||
components::player_command_button<"vehkick">(g_player_service->get_selected(), {});
|
||||
|
||||
components::button("Kick From Interior", [] { toxic::kick_player_from_interior(g_player_service->get_selected()); });
|
||||
components::button("Turn Into Beast", [] { toxic::turn_player_into_beast(g_player_service->get_selected()); });
|
||||
components::player_command_button<"ragdoll">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"intkick">(g_player_service->get_selected(), {});
|
||||
components::player_command_button<"beast">(g_player_service->get_selected(), {});
|
||||
|
||||
static int wanted_level;
|
||||
ImGui::SliderInt("Wanted Level", &wanted_level, 0, 5);
|
||||
ImGui::SameLine();
|
||||
components::button("Set", [] { toxic::set_wanted_level(g_player_service->get_selected(), wanted_level); });
|
||||
components::player_command_button<"wanted">(g_player_service->get_selected(), { (uint64_t)wanted_level }, "Set");
|
||||
|
||||
components::small_text("Teleports");
|
||||
|
||||
@ -51,7 +48,7 @@ namespace big
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("TP To Apartment", [] { toxic::send_player_to_apartment(g_player_service->get_selected(), g.session.send_to_apartment_idx); });
|
||||
components::player_command_button<"apartmenttp">(g_player_service->get_selected(), { (uint64_t)g.session.send_to_apartment_idx });
|
||||
|
||||
if (ImGui::BeginCombo("##warehouse", warehouse_names[g.session.send_to_warehouse_idx]))
|
||||
{
|
||||
@ -73,7 +70,7 @@ namespace big
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("TP To Warehouse", [] { toxic::send_player_to_warehouse(g_player_service->get_selected(), g.session.send_to_warehouse_idx); });
|
||||
components::player_command_button<"warehousetp">(g_player_service->get_selected(), { (uint64_t)g.session.send_to_warehouse_idx });
|
||||
|
||||
components::button("TP To Darts", [] { toxic::start_activity(g_player_service->get_selected(), eActivityType::Darts); });
|
||||
ImGui::SameLine();
|
||||
@ -83,31 +80,31 @@ namespace big
|
||||
|
||||
components::button("TP To Skydive", [] { toxic::start_activity(g_player_service->get_selected(), eActivityType::Skydive); });
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Cayo Perico", [] { toxic::send_player_to_island(g_player_service->get_selected()); });
|
||||
components::player_command_button<"cayotp">(g_player_service->get_selected(), { });
|
||||
ImGui::SameLine();
|
||||
components::button("TP To MOC", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 81); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 81 }, "TP To MOC");
|
||||
|
||||
components::button("TP To Casino", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 123); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 123 }, "TP To Casino");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Penthouse", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 124); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 124 }, "TP To Penthouse");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Arcade", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 128); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 128 }, "TP To Arcade");
|
||||
|
||||
components::button("TP To Music Locker", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 146); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 146 }, "TP To Music Locker");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Record A Studios", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 148); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 148 }, "TP To Record A Studios");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Custom Auto Shop", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 149); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 149 }, "TP To Custom Auto Shop");
|
||||
|
||||
components::button("TP To Agency", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 155); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 155 }, "TP To Agency");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Freakshop", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 160); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 160 }, "TP To Freakshop");
|
||||
ImGui::SameLine();
|
||||
components::button("TP To Multi-Floor Garage", [] { toxic::send_player_to_interior(g_player_service->get_selected(), 161); });
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), { 161 }, "TP To Multi Floor Garage");
|
||||
|
||||
components::button("Give All Weapons", [] { toxic::give_all_weapons(g_player_service->get_selected()); });
|
||||
components::player_command_button<"giveweaps">(g_player_service->get_selected(), { });
|
||||
ImGui::SameLine();
|
||||
components::button("Remove All Weapons", [] { toxic::remove_all_weapons(g_player_service->get_selected()); });
|
||||
components::player_command_button<"remweaps">(g_player_service->get_selected(), { });
|
||||
|
||||
components::small_text("Warp Time (requires session host)");
|
||||
|
||||
|
@ -8,40 +8,13 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode("Troll"))
|
||||
{
|
||||
components::button("Teleport", []
|
||||
{
|
||||
teleport::to_player(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
components::player_command_button<"playertp">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"bring">(g_player_service->get_selected());
|
||||
|
||||
components::button("Bring", []
|
||||
{
|
||||
teleport::bring_player(g_player_service->get_selected());
|
||||
});
|
||||
|
||||
components::button("Teleport into Vehicle", []
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), false);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
});
|
||||
|
||||
components::button("Remote Control Vehicle", []
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), FALSE);
|
||||
if (veh == 0)
|
||||
{
|
||||
if (g.player.spectating)
|
||||
g_notification_service->push_warning("Remote Control", "Player not in a vehicle");
|
||||
else
|
||||
g_notification_service->push_warning("Remote Control", "Player not in a vehicle, try spectating the player");
|
||||
return;
|
||||
}
|
||||
|
||||
vehicle::remote_control_vehicle(veh);
|
||||
g.player.spectating = false;
|
||||
});
|
||||
components::player_command_button<"playervehtp">(g_player_service->get_selected());
|
||||
components::player_command_button<"rcplayer">(g_player_service->get_selected());
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
@ -7,12 +7,6 @@ namespace big
|
||||
{
|
||||
void view::mobile() {
|
||||
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
|
||||
|
||||
components::sub_title("Lester");
|
||||
|
||||
ImGui::Checkbox("Off Radar", &g.self.off_radar);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Merryweather");
|
||||
|
||||
|
@ -9,42 +9,15 @@ namespace big
|
||||
{
|
||||
void view::self()
|
||||
{
|
||||
components::button("Suicide", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0);
|
||||
});
|
||||
|
||||
components::command_button<"suicide">();
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Heal", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, PED::GET_PED_MAX_HEALTH(self::ped), 0);
|
||||
PED::SET_PED_ARMOUR(self::ped, PLAYER::GET_PLAYER_MAX_ARMOUR(self::id));
|
||||
});
|
||||
|
||||
components::command_button<"heal">();
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Fill Inventory", [] {
|
||||
std::string mpPrefix = local_player::get_mp_prefix();
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_YUM_SNACKS"), 30, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_HEALTH_SNACKS"), 15, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_EPIC_SNACKS"), 5, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_1_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_2_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_3_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_4_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_5_COUNT"), 10, true);
|
||||
});
|
||||
|
||||
components::command_button<"fillsnacks">();
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Skip Cutscene", [] {
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
});
|
||||
|
||||
components::command_button<"skipcutscene">();
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Clean Player", [] {
|
||||
entity::clean_ped(self::ped);
|
||||
});
|
||||
components::command_button<"clean">();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@ -53,33 +26,32 @@ namespace big
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("God Mode", &g.self.god_mode);
|
||||
ImGui::Checkbox("Off Radar", &g.self.off_radar);
|
||||
ImGui::Checkbox("Free Cam", &g.self.free_cam);
|
||||
ImGui::Checkbox("Disable Phone", &g.tunables.disable_phone);
|
||||
ImGui::Checkbox("Unlimited Oxygen", &g.self.unlimited_oxygen);
|
||||
ImGui::Checkbox("Fast Respawn", &g.self.fast_respawn);
|
||||
components::command_checkbox<"otr">();
|
||||
components::command_checkbox<"freecam">();
|
||||
components::command_checkbox<"nophone">();
|
||||
components::command_checkbox<"infoxy">();
|
||||
components::command_checkbox<"fastrespawn">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("No Clip", &g.self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g.self.no_ragdoll);
|
||||
ImGui::Checkbox("Super Run", &g.self.super_run);
|
||||
components::command_checkbox<"noclip">();
|
||||
components::command_checkbox<"noragdoll">();
|
||||
components::command_checkbox<"fastrun">();
|
||||
ImGui::Checkbox("No Idle Kick", &g.tunables.no_idle_kick);
|
||||
ImGui::Checkbox("No Water Collision", &g.self.no_water_collision);
|
||||
components::command_checkbox<"walkunder">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Invisibility", &g.self.invisibility);
|
||||
if (g.self.invisibility) {
|
||||
ImGui::Checkbox("Locally Visible", &g.self.local_visibility);
|
||||
}
|
||||
ImGui::Checkbox("Keep Player Clean", &g.self.clean_player);
|
||||
ImGui::Checkbox("No Collision", &g.self.no_collision);
|
||||
ImGui::Checkbox("Mobile Radio", &g.self.mobile_radio);
|
||||
components::command_checkbox<"invis">();
|
||||
if (g.self.invisibility)
|
||||
components::command_checkbox<"localvis">();
|
||||
components::command_checkbox<"cleanloop">();
|
||||
components::command_checkbox<"nocollision">();
|
||||
components::command_checkbox<"mobileradio">();
|
||||
|
||||
ImGui::Checkbox("Dance Mode", &g.self.dance_mode);
|
||||
if (ImGui::IsItemHovered())
|
||||
|
@ -11,42 +11,17 @@ namespace big
|
||||
{
|
||||
ImGui::Text("Blips:");
|
||||
|
||||
components::button("Waypoint", []
|
||||
{
|
||||
teleport::to_waypoint();
|
||||
});
|
||||
|
||||
components::button("Objective", []
|
||||
{
|
||||
teleport::to_objective();
|
||||
});
|
||||
components::command_button<"waypointtp">({}, "Waypoint");
|
||||
ImGui::SameLine();
|
||||
components::command_button<"objectivetp">({}, "Objective");
|
||||
|
||||
ImGui::Checkbox("Auto-Teleport To Waypoint", &g.self.auto_tp);
|
||||
|
||||
ImGui::Text("Vehicles:");
|
||||
|
||||
components::button("Teleport to Last Vehicle", []
|
||||
{
|
||||
if (g_local_player && g_local_player->m_vehicle)
|
||||
{
|
||||
const Vehicle veh = g_pointers->m_ptr_to_handle(g_local_player->m_vehicle);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
}
|
||||
});
|
||||
|
||||
components::button("Bring Personal Vehicle", []
|
||||
{
|
||||
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
||||
|
||||
vehicle::bring(veh, self::pos);
|
||||
});
|
||||
|
||||
components::button("Teleport to Personal Vehicle", []
|
||||
{
|
||||
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
});
|
||||
components::command_button<"lastvehtp">();
|
||||
ImGui::SameLine();
|
||||
components::command_button<"bringpv">();
|
||||
ImGui::SameLine();
|
||||
components::command_button<"pvtp">();
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ namespace big
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Infinite Ammo", &g.weapons.infinite_ammo);
|
||||
ImGui::Checkbox("Infinite Clip", &g.weapons.infinite_mag);
|
||||
components::command_checkbox<"infammo">();
|
||||
components::command_checkbox<"infclip">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
@ -29,7 +29,7 @@ namespace big
|
||||
else
|
||||
g_pointers->m_bypass_max_count_of_active_sticky_bombs->restore();
|
||||
}
|
||||
ImGui::Checkbox("Rapid Fire", &g.weapons.rapid_fire);
|
||||
components::command_checkbox<"rapidfire">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
@ -80,15 +80,11 @@ namespace big
|
||||
|
||||
components::sub_title("Misc");
|
||||
|
||||
ImGui::Checkbox("Force Crosshairs", &g.weapons.force_crosshairs);
|
||||
|
||||
components::command_checkbox<"crosshairs">();
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("No Recoil", &g.weapons.no_recoil);
|
||||
|
||||
components::command_checkbox<"norecoil">();
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("No Spread", &g.weapons.no_spread);
|
||||
components::command_checkbox<"nospread">();
|
||||
|
||||
components::button("Get All Weapons", []
|
||||
{
|
||||
|
@ -19,9 +19,9 @@ namespace big
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Spawn In", &g.spawn_vehicle.spawn_inside);
|
||||
components::command_checkbox<"spawnin">();
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Spawn Maxed", &g.spawn_vehicle.spawn_maxed);
|
||||
components::command_checkbox<"spawnmaxed">();
|
||||
|
||||
static char plate_buf[9] = { 0 };
|
||||
strncpy(plate_buf, g.spawn_vehicle.plate.c_str(), 9);
|
||||
|
@ -20,7 +20,7 @@ namespace big
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Keep Vehicle Repaired", &g.vehicle.keep_vehicle_repaired);
|
||||
components::command_checkbox<"keepfixed">();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@ -67,29 +67,30 @@ namespace big
|
||||
components::sub_title("General");
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("God Mode", &g.vehicle.god_mode);
|
||||
ImGui::Checkbox("Horn Boost", &g.vehicle.horn_boost);
|
||||
ImGui::Checkbox("Vehicle Jump", &g.vehicle.vehicle_jump);
|
||||
components::command_checkbox<"hornboost">();
|
||||
components::command_checkbox<"vehjump">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Instant Brake", &g.vehicle.instant_brake);
|
||||
ImGui::Checkbox("Can Be Targeted", &g.vehicle.is_targetable);
|
||||
ImGui::Checkbox("Drive On Water", &g.vehicle.drive_on_water);
|
||||
components::command_checkbox<"instantbrake">();
|
||||
components::command_checkbox<"blockhoming">();
|
||||
components::command_checkbox<"driveonwater">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Seatbelt", &g.vehicle.seatbelt);
|
||||
components::command_checkbox<"seatbelt">();
|
||||
ImGui::Checkbox("Turn Signals", &g.vehicle.turn_signals);
|
||||
if (g.vehicle.turn_signals)
|
||||
{
|
||||
ImGui::Checkbox("Fully Automatic Signal", &g.vehicle.auto_turn_signals);
|
||||
}
|
||||
ImGui::Checkbox("No Water Collision", &g.vehicle.no_water_collision);
|
||||
components::command_checkbox<"driveunder">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
Reference in New Issue
Block a user