Converted all static strings to translation keys. (#2284)

This commit is contained in:
gir489
2023-10-20 12:24:44 -04:00
committed by GitHub
parent cc911253d0
commit 79df8bc021
133 changed files with 1027 additions and 1021 deletions

View File

@ -69,5 +69,5 @@ namespace big
}
bool_command
g_cmd_executor("cmdexecutor", "Toggle Command Executor", "Toggles the command executor window", g.cmd_executor.enabled, false);
g_cmd_executor("cmdexecutor", "CMD_EXECUTOR", "CMD_EXECUTOR_DESC", g.cmd_executor.enabled, false);
}

View File

@ -28,45 +28,48 @@ namespace big
ImGui::Separator();
if (g.window.ingame_overlay.show_fps)
ImGui::Text("%.0f FPS", ImGui::GetIO().Framerate);
{
ImGui::Text(std::format("{:.0f} {}", ImGui::GetIO().Framerate, "VIEW_OVERLAY_FPS"_T).c_str());
}
if (CNetworkPlayerMgr* network_player_mgr = gta_util::get_network_player_mgr(); g.window.ingame_overlay.show_players)
ImGui::Text(std::format("Players: {}/{}", network_player_mgr->m_player_count, network_player_mgr->m_player_limit)
.c_str());
{
ImGui::Text(std::format("{}: {}/{}", "PLAYERS"_T, network_player_mgr->m_player_count, network_player_mgr->m_player_limit).c_str());
}
if (g.window.ingame_overlay.show_indicators)
{
ImGui::Separator();
if (g.window.ingame_overlay_indicators.show_player_godmode)
components::overlay_indicator("Player Godmode", g.self.god_mode);
components::overlay_indicator("VIEW_OVERLAY_PLAYER_GODMODE"_T, g.self.god_mode);
if (g.window.ingame_overlay_indicators.show_off_radar)
components::overlay_indicator("Off Radar", g.self.off_radar);
components::overlay_indicator("OFF_THE_RADAR"_T, g.self.off_radar);
if (g.window.ingame_overlay_indicators.show_vehicle_godmode)
components::overlay_indicator("Vehicle Godmode", g.vehicle.god_mode);
components::overlay_indicator("VIEW_OVERLAY_VEHICLE_GODMODE"_T, g.vehicle.god_mode);
if (g.window.ingame_overlay_indicators.show_never_wanted)
components::overlay_indicator("Never Wanted", g.self.never_wanted);
components::overlay_indicator("NEVER_WANTED"_T, g.self.never_wanted);
if (g.window.ingame_overlay_indicators.show_infinite_ammo)
components::overlay_indicator("Infinite Ammo", g.weapons.infinite_ammo);
components::overlay_indicator("VIEW_OVERLAY_INFINITE_AMMO"_T, g.weapons.infinite_ammo);
if (g.window.ingame_overlay_indicators.show_always_full_ammo)
components::overlay_indicator("Always Full Ammo", g.weapons.always_full_ammo);
components::overlay_indicator("VIEW_OVERLAY_ALWAYS_FULL_AMMO"_T, g.weapons.always_full_ammo);
if (g.window.ingame_overlay_indicators.show_infinite_mag)
components::overlay_indicator("Infinite Magazine", g.weapons.infinite_mag);
components::overlay_indicator("VIEW_OVERLAY_INFINITE_MAGAZINE"_T, g.weapons.infinite_mag);
if (g.window.ingame_overlay_indicators.show_aimbot)
components::overlay_indicator("Aimbot", g.weapons.aimbot.enable);
components::overlay_indicator("VIEW_OVERLAY_AIMBOT"_T, g.weapons.aimbot.enable);
if (g.window.ingame_overlay_indicators.show_triggerbot)
components::overlay_indicator("Triggerbot", g.weapons.triggerbot);
components::overlay_indicator("VIEW_OVERLAY_TRIGGERBOT"_T, g.weapons.triggerbot);
if (g.window.ingame_overlay_indicators.show_invisibility)
components::overlay_indicator("Invisibility", g.self.invisibility);
components::overlay_indicator("INVISIBILITY"_T, g.self.invisibility);
}
if (g.window.ingame_overlay.show_position && g_local_player)
@ -75,7 +78,7 @@ namespace big
auto& pos = *g_local_player->get_position();
ImGui::Text("Pos: %.2f, %.2f, %.2f", pos.x, pos.y, pos.z);
ImGui::Text(std::format("{}: {:.2f}, {:.2f}, {:.2f}", "VIEW_OVERLAY_POSITION"_T, pos.x, pos.y, pos.z).c_str());
}
if (g.window.ingame_overlay.show_replay_interface)
@ -85,29 +88,38 @@ namespace big
ImGui::Separator();
if (*g_pointers->m_gta.m_ped_pool)
ImGui::Text(std::format("Ped Pool: {}/{}",
{
ImGui::Text(std::format("{}: {}/{}",
"VIEW_OVERLAY_PED_POOL"_T,
(*g_pointers->m_gta.m_ped_pool)->get_item_count(),
(*g_pointers->m_gta.m_ped_pool)->m_size)
.c_str());
}
if (*g_pointers->m_gta.m_vehicle_pool && **g_pointers->m_gta.m_vehicle_pool)
ImGui::Text(std::format("Vehicle Pool: {}/{}",
{
ImGui::Text(std::format("{}: {}/{}",
"VIEW_OVERLAY_VEHICLE_POOL"_T,
(**g_pointers->m_gta.m_vehicle_pool)->m_item_count,
(**g_pointers->m_gta.m_vehicle_pool)->m_size)
.c_str());
}
if (*g_pointers->m_gta.m_prop_pool)
ImGui::Text(std::format("Object Pool: {}/{}",
{
ImGui::Text(std::format("{}: {}/{}",
"VIEW_OVERLAY_OBJECT_POOL"_T,
(*g_pointers->m_gta.m_prop_pool)->get_item_count(),
(*g_pointers->m_gta.m_prop_pool)->m_size)
.c_str());
}
}
if (g.window.ingame_overlay.show_game_versions)
{
ImGui::Separator();
ImGui::Text(std::format("Game Version: {}", g_pointers->m_gta.m_game_version).c_str());
ImGui::Text(std::format("Online Version: {}", g_pointers->m_gta.m_online_version).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_OVERLAY_GAME_VERSION"_T, g_pointers->m_gta.m_game_version).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_OVERLAY_ONLINE_VERSION"_T, g_pointers->m_gta.m_online_version).c_str());
}
}
ImGui::End();

View File

@ -19,7 +19,7 @@ namespace big
script_events();
scripts();
threads();
if (ImGui::BeginTabItem("Animations"))
if (ImGui::BeginTabItem("GUI_TAB_ANIMATIONS"_T.data()))
{
animations();
ImGui::EndTabItem();

View File

@ -25,15 +25,17 @@ namespace big
}
};
if(animations::has_anim_list_been_populated())
ImGui::Text(std::format("There are {} dictionaries with {} animations in memory", animations::anim_dict_count(), animations::total_anim_count()).data());
if (animations::has_anim_list_been_populated())
{
ImGui::Text("VIEW_DEBUG_ANIMATIONS_ANIMATIONS_IN_MEMORY"_T.data(), animations::anim_dict_count(), animations::total_anim_count());
}
components::button("Fetch All Anims", [] {
components::button("VIEW_DEBUG_ANIMATIONS_FETCH_ALL_ANIMS"_T, [] {
animations::fetch_all_anims();
});
ImGui::SetNextItemWidth(400);
components::input_text_with_hint("##dictionaryfilter", "Dictionary", current_dict);
components::input_text_with_hint("##dictionaryfilter", "DICT"_T, current_dict);
if (animations::has_anim_list_been_populated() && ImGui::BeginListBox("##dictionaries", ImVec2(400, 200)))
{
@ -66,12 +68,12 @@ namespace big
ImGui::EndListBox();
}
components::button("Play", [] {
components::button("VIEW_DEBUG_ANIMATIONS_PLAY"_T, [] {
TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped);
ped::ped_play_animation(self::ped, current_dict, current_anim, 4.f, -4.f, -1, 0, 0, false);
});
ImGui::SameLine();
components::button("Stop", [] {
components::button("VIEW_DEBUG_ANIMATIONS_STOP"_T, [] {
TASK::CLEAR_PED_TASKS(self::ped);
});
}

View File

@ -137,62 +137,56 @@ namespace big
static global_debug global_test{};
static script_global glo_bal_sunday = script_global(global_test.global_index);
ImGui::SetNextItemWidth(200.f);
if (ImGui::InputScalar("Global", ImGuiDataType_U64, &global_test.global_index))
if (ImGui::InputScalar("VIEW_DEBUG_GLOBAL"_T.data(), ImGuiDataType_U64, &global_test.global_index))
glo_bal_sunday = script_global(global_test.global_index);
for (int i = 0; i < global_test.global_appendages.size(); i++)
{
auto item = global_test.global_appendages[i];
ImGui::PushID(i + item.type);
switch (item.type)
{
case GlobalAppendageType_At:
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar(std::format("At##{}{}", i, (int)item.type).c_str(),
ImGuiDataType_S64,
&global_test.global_appendages[i].index);
ImGui::SameLine();
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar(std::format("Size##{}{}", i, (int)item.type).c_str(),
ImGuiDataType_S64,
&global_test.global_appendages[i].size);
break;
case GlobalAppendageType_ReadGlobal:
ImGui::Text(std::format("Read Global {}", item.global_name).c_str());
ImGui::SameLine();
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar(std::format("Size##{}{}", i, (int)item.type).c_str(),
ImGuiDataType_S64,
&global_test.global_appendages[i].size);
break;
case GlobalAppendageType_PlayerId:
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar(std::format("Read Player ID Size##{}{}", i, (int)item.type).c_str(),
ImGuiDataType_S64,
&global_test.global_appendages[i].size);
break;
case GlobalAppendageType_At:
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("VIEW_DEBUG_GLOBAL_AT"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].index);
ImGui::SameLine();
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("VIEW_DEBUG_GLOBAL_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size);
break;
case GlobalAppendageType_ReadGlobal:
ImGui::Text(std::format("{} {}", "VIEW_DEBUG_GLOBAL_READ_GLOBAL"_T, item.global_name).c_str());
ImGui::SameLine();
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("VIEW_DEBUG_GLOBAL_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size);
break;
case GlobalAppendageType_PlayerId:
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("VIEW_DEBUG_GLOBAL_READ_PLAYER_ID_SIZE"_T.data(), ImGuiDataType_S64, &global_test.global_appendages[i].size);
break;
}
ImGui::PopID();
}
if (ImGui::Button("Add Offset"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_OFFSET"_T.data()))
global_test.global_appendages.push_back({GlobalAppendageType_At, 0LL, 0ULL});
ImGui::SameLine();
if (ImGui::Button("Add Read Player Id"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_READ_PLAYER_ID"_T.data()))
global_test.global_appendages.push_back({GlobalAppendageType_PlayerId, 0LL, 0ULL});
if (global_test.global_appendages.size() > 0 && ImGui::Button("Remove Offset"))
if (global_test.global_appendages.size() > 0 && ImGui::Button("VIEW_DEBUG_GLOBAL_REMOVE_OFFSET"_T.data()))
global_test.global_appendages.pop_back();
if (auto ptr = get_global_ptr(global_test))
{
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("Value", ImGuiDataType_S32, ptr);
ImGui::InputScalar("VIEW_DEBUG_GLOBAL_VALUE"_T.data(), ImGuiDataType_S32, ptr);
}
else
ImGui::Text("INVALID_GLOBAL_READ");
ImGui::Text("VIEW_DEBUG_GLOBAL_INVALID_GLOBAL_READ"_T.data());
auto globals = list_globals();
static std::string selected_global;
ImGui::Text("Saved Globals");
ImGui::Text("VIEW_DEBUG_GLOBAL_SAVED_GLOBALS"_T.data());
if (ImGui::BeginListBox("##savedglobals", ImVec2(200, 200)))
{
for (auto pair : globals)
@ -210,7 +204,7 @@ namespace big
if (auto ptr = get_global_ptr(pair.second))
ImGui::Selectable(std::format("{}", (std::int32_t)*ptr).c_str(), false, ImGuiSelectableFlags_Disabled);
else
ImGui::Selectable("INVALID_GLOBAL_READ", false, ImGuiSelectableFlags_Disabled);
ImGui::Selectable("VIEW_DEBUG_GLOBAL_INVALID_GLOBAL_READ"_T.data(), false, ImGuiSelectableFlags_Disabled);
}
ImGui::EndListBox();
}
@ -226,12 +220,12 @@ namespace big
save_global(global_name, global_test);
}
ImGui::SameLine();
if (ImGui::Button("Load Global"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_LOAD_GLOBAL"_T.data()))
{
load_global_menu(selected_global, global_test);
}
if (ImGui::Button("Delete Global"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_DELETE_GLOBAL"_T.data()))
{
if (!selected_global.empty())
{
@ -240,12 +234,12 @@ namespace big
}
}
ImGui::SameLine();
if (ImGui::Button("Add Read Global"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_ADD_READ_GLOBAL"_T.data()))
{
global_test.global_appendages.push_back({GlobalAppendageType_ReadGlobal, 0LL, 0ULL, selected_global});
}
ImGui::SameLine();
if (ImGui::Button("Clear"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_CLEAR"_T.data()))
{
global_test.global_index = 0;
global_test.global_appendages.clear();

View File

@ -15,11 +15,11 @@ namespace big
static int offsets[10][2] = {};
static int offset_count = 0;
static int previous_offset_count = 0;
components::input_text("Name", name, sizeof(name));
components::input_text("Script Name", script_thread_name, sizeof(script_thread_name));
ImGui::Text("Base address");
components::input_text("NAME"_T, name, sizeof(name));
components::input_text("VIEW_DEBUG_LOCALS_SCRIPT_NAME"_T, script_thread_name, sizeof(script_thread_name));
ImGui::Text("VIEW_DEBUG_LOCALS_BASE_ADDRESS"_T.data());
ImGui::InputInt("##local_base_address", &base_address);
ImGui::Text("Offsetcount");
ImGui::Text("VIEW_DEBUG_LOCALS_OFFSET_COUNT"_T.data());
ImGui::InputInt("##modal_offset_count", &offset_count);
offset_count = std::clamp(offset_count, 0, 10);
@ -71,7 +71,7 @@ namespace big
}
else
{
g_notification_service->push_error("Locals editor", "Script does not exist");
g_notification_service->push_error("DEBUG_TAB_LOCALS"_T.data(), "VIEW_DEBUG_LOCALS_SCRIPT_DOES_NOT_EXIST"_T.data());
}
};
}
@ -86,7 +86,7 @@ namespace big
if (components::button("SAVE"_T))
g_locals_service.save();
if (components::button("Add Local"))
if (components::button("VIEW_DEBUG_LOCALS_ADD_LOCAL"_T))
{
ImGui::OpenPopup("##addlocal");
}
@ -136,7 +136,7 @@ namespace big
local_.m_edit_mode = 3;
ImGui::LabelText(local_.get_local_chain_text(), "Value");
ImGui::LabelText(local_.get_local_chain_text(), "VIEW_DEBUG_GLOBAL_VALUE"_T.data());
ImGui::SetNextItemWidth(200);
@ -198,7 +198,7 @@ namespace big
}
ImGui::SameLine();
if (ImGui::Checkbox("Freeze", &local_.m_freeze))
if (ImGui::Checkbox("VIEW_DEBUG_LOCALS_FREEZE"_T.data(), &local_.m_freeze))
{
local_.m_freeze_value_int = *local_.m_internal_address;
local_.m_freeze_value_float = *reinterpret_cast<float*>(local_.m_internal_address);
@ -207,7 +207,7 @@ namespace big
}
else
{
if (components::button("Fetch"))
if (components::button("VIEW_DEBUG_LOCALS_FETCH"_T))
{
local_.fetch_local_pointer();
}
@ -216,10 +216,10 @@ namespace big
else
{
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f));
ImGui::Text("%s isn't running", local_.m_script_thread_name);
ImGui::Text(std::format("{} {}", local_.m_script_thread_name, "VIEW_DEBUG_LOCALS_SCRIPT_IS_NOT_RUNNING"_T).c_str());
ImGui::PopStyleColor();
}
if (components::button("Delete"))
if (components::button("DELETE"_T))
std::erase_if(g_locals_service.m_locals, [local_](local l) {
return l.get_id() == local_.get_id();
});

View File

@ -18,28 +18,28 @@ namespace big
{
if (ImGui::BeginTabItem("DEBUG_TAB_MISC"_T.data()))
{
components::command_checkbox<"windowhook">("Disable GTA Window Hook");
components::command_checkbox<"windowhook">("VIEW_DEBUG_MISC_DISABLE_GTA_WINDOW_HOOK"_T);
ImGui::Text("Fiber Pool Usage %d/%d", g_fiber_pool->get_used_fibers(), g_fiber_pool->get_total_fibers());
ImGui::Text(std::format("{}: {}/{}", "VIEW_DEBUG_MISC_FIBER_POOL_USAGE"_T, g_fiber_pool->get_used_fibers(), g_fiber_pool->get_total_fibers()).c_str());
ImGui::SameLine();
if (components::button("RESET"_T.data()))
if (components::button("RESET"_T))
{
g_fiber_pool->reset();
}
if (components::button("Trigger GTA Error Message Box"))
if (components::button("VIEW_DEBUG_MISC_TRIGGER_GTA_ERROR_BOX"_T))
{
hooks::log_error_message_box(0xBAFD530B, 1);
}
if (components::button("DUMP_ENTRYPOINTS"_T.data()))
if (components::button("DUMP_ENTRYPOINTS"_T))
{
system::dump_entry_points();
}
components::button("NETWORK_BAIL"_T.data(), [] {
components::button("NETWORK_BAIL"_T, [] {
NETWORK::NETWORK_BAIL(16, 0, 0);
});
@ -50,53 +50,53 @@ namespace big
STATS::STAT_SET_BOOL(RAGE_JOAAT("MPPLY_CHAR_IS_BADSPORT"), false, true);
});
components::button("LOAD_MP_MAP"_T.data(), [] {
components::button("LOAD_MP_MAP"_T, [] {
DLC::ON_ENTER_MP();
});
ImGui::SameLine();
components::button("LOAD_SP_MAP"_T.data(), [] {
components::button("LOAD_SP_MAP"_T, [] {
DLC::ON_ENTER_SP();
});
components::button("SKIP_CUTSCENE"_T.data(), [] {
components::button("SKIP_CUTSCENE"_T, [] {
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
});
components::button("REFRESH_INTERIOR"_T.data(), [] {
components::button("REFRESH_INTERIOR"_T, [] {
Interior interior = INTERIOR::GET_INTERIOR_AT_COORDS(self::pos.x, self::pos.y, self::pos.z);
INTERIOR::REFRESH_INTERIOR(interior);
});
components::button("NET_SHUTDOWN_AND_LOAD_SP"_T.data(), [] {
components::button("NET_SHUTDOWN_AND_LOAD_SP"_T, [] {
NETWORK::SHUTDOWN_AND_LAUNCH_SINGLE_PLAYER_GAME();
});
components::button("NET_SHUTDOWN_AND_LOAD_SAVE"_T.data(), [] {
components::button("NET_SHUTDOWN_AND_LOAD_SAVE"_T, [] {
NETWORK::SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE();
});
components::button("REMOVE_BLACKSCREEN"_T.data(), [] {
components::button("REMOVE_BLACKSCREEN"_T, [] {
CAM::DO_SCREEN_FADE_IN(0);
});
components::button("TP_TO_SAFE_POS"_T.data(), [] {
components::button("TP_TO_SAFE_POS"_T, [] {
Vector3 safepos{};
float heading;
if (pathfind::find_closest_vehicle_node(self::pos, safepos, heading, 0))
ENTITY::SET_ENTITY_COORDS(self::ped, safepos.x, safepos.y, safepos.z, 0, 0, 0, false);
else
g_notification_service->push_error("Find safe pos", "Failed to find a safe position");
g_notification_service->push_error("DEBUG_TAB_MISC"_T.data(), "VIEW_DEBUG_MISC_TP_TO_SAFE_POS_FAILED"_T.data());
});
ImGui::Checkbox("ImGui Demo", &g.window.demo);
ImGui::Checkbox("VIEW_DEBUG_MISC_IMGUI_DEMO"_T.data(), &g.window.demo);
components::command_button<"fastquit">();
if (ImGui::TreeNode("Fuzzer"))
if (ImGui::TreeNode("VIEW_DEBUG_MISC_FUZZER"_T.data()))
{
ImGui::Checkbox("Enabled", &g.debug.fuzzer.enabled);
ImGui::Checkbox("ENABLED"_T.data(), &g.debug.fuzzer.enabled);
for (int i = 0; i < net_object_type_strs.size(); i++)
{
@ -152,8 +152,8 @@ namespace big
static char dict[100], anim[100];
ImGui::PushItemWidth(200);
components::input_text_with_hint("##dictionary", "DICT"_T.data(), dict, IM_ARRAYSIZE(dict));
components::input_text_with_hint("##animation", "ANIMATION"_T.data(), anim, IM_ARRAYSIZE(anim));
components::input_text_with_hint("##dictionary", "DICT"_T, dict, IM_ARRAYSIZE(dict));
components::input_text_with_hint("##animation", "ANIMATION"_T, anim, IM_ARRAYSIZE(anim));
if (ImGui::Button("PLAY_ANIMATION"_T.data()))
g_fiber_pool->queue_job([=] {
ped::ped_play_animation(self::ped, dict, anim);

View File

@ -16,7 +16,7 @@ namespace big
{
if (ImGui::Checkbox(script->name(), script->toggle_ptr()))
{
g_notification_service->push(std::string(script->name()).append(" script"), script->is_enabled() ? "Resumed" : "Halted");
g_notification_service->push(std::string(script->name()).append("VIEW_DEBUG_SCRIPTS_SCRIPT"_T.data()), script->is_enabled() ? "VIEW_DEBUG_SCRIPTS_RESUMED"_T.data() : "VIEW_DEBUG_SCRIPTS_HALTED"_T.data());
}
}
});

View File

@ -34,7 +34,7 @@ namespace big
{
void debug::threads()
{
if (ImGui::BeginTabItem("Threads"))
if (ImGui::BeginTabItem("VIEW_DEBUG_THREADS"_T.data()))
{
if (!g_pointers->m_gta.m_script_threads)
{
@ -43,9 +43,9 @@ namespace big
return;
}
components::small_text("Threads");
components::small_text("VIEW_DEBUG_THREADS"_T);
if (ImGui::BeginCombo("Thread", selected_thread ? selected_thread->m_name : "NONE"))
if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_THREAD"_T.data(), selected_thread ? selected_thread->m_name : "VIEW_DEBUG_THREADS_SELECTED_NONE"_T.data()))
{
for (auto script : *g_pointers->m_gta.m_script_threads)
{
@ -85,11 +85,11 @@ namespace big
auto host = net_handler->get_host();
if (host)
{
ImGui::Text("Script Host: %s", host->get_name());
ImGui::Text(std::format("{}: {}", "VIEW_DEBUG_THREADS_SCRIPT_HOST"_T, host->get_name()).c_str());
if (!net_handler->is_local_player_host())
{
components::button("Take Control", [net_handler] {
components::button("VIEW_DEBUG_THREADS_TAKE_CONTROL"_T, [net_handler] {
net_handler->send_host_migration_event(g_player_service->get_self()->get_net_game_player());
script::get_current()->yield(10ms);
if (selected_thread->m_stack && selected_thread->m_net_component)
@ -101,29 +101,37 @@ namespace big
}
}
ImGui::Combo("State", (int*)&selected_thread->m_context.m_state, "RUNNING\0WAITING\0KILLED\0PAUSED\0STATE_4");
static const std::string thread_states = std::string("VIEW_DEBUG_THREADS_STATE_0"_T.data()) + '\0'
+ std::string("VIEW_DEBUG_THREADS_STATE_1"_T.data()) + '\0'
+ std::string("VIEW_DEBUG_THREADS_STATE_2"_T.data()) + '\0'
+ std::string("VIEW_DEBUG_THREADS_STATE_3"_T.data()) + '\0'
+ std::string("VIEW_DEBUG_THREADS_STATE_4"_T.data());
ImGui::Combo("VIEW_DEBUG_THREADS_STATE"_T.data(), (int*)&selected_thread->m_context.m_state, thread_states.c_str());
//Script Pointer
ImGui::Text("Script Pointer: ");
ImGui::Text(std::format("{}: ", "VIEW_DEBUG_THREADS_SCRIPT_POINTER"_T).c_str());
ImGui::SameLine();
if (ImGui::Button(std::format("0x{:X}", (DWORD64)selected_thread).c_str()))
ImGui::SetClipboardText(std::format("0x{:X}", (DWORD64)selected_thread).c_str());
//Stack Pointer
ImGui::Text("Stack Pointer: ");
ImGui::Text(std::format("{}: ", "VIEW_DEBUG_THREADS_STACK_POINTER"_T).c_str());
ImGui::SameLine();
if (ImGui::Button(std::format("0x{:X}", (DWORD64)selected_thread->m_stack).c_str()))
ImGui::SetClipboardText(std::format("0x{:X}", (DWORD64)selected_thread->m_stack).c_str());
ImGui::SameLine();
ImGui::Text("Internal Stack Pointer: %d Stack Size: %d",
selected_thread->m_context.m_stack_pointer, selected_thread->m_context.m_stack_size);
ImGui::Text(std::format("{}: {} {}: {}",
"VIEW_DEBUG_THREADS_INTERNAL_STACK_POINTER"_T, selected_thread->m_context.m_stack_pointer,
"VIEW_DEBUG_THREADS_STACK_SIZE"_T, selected_thread->m_context.m_stack_size)
.c_str());
//Instruction Pointer
ImGui::Text("Instruction Pointer: %X", selected_thread->m_context.m_instruction_pointer);
ImGui::Text(std::format("{}: 0x{:X}","VIEW_DEBUG_THREADS_INSTRUCTION_POINTER"_T, selected_thread->m_context.m_instruction_pointer).c_str());
if (selected_thread->m_context.m_state == rage::eThreadState::killed)
ImGui::Text("Exit Reason: %s", selected_thread->m_exit_message);
{
ImGui::Text(std::format("{}: {}","VIEW_DEBUG_THREADS_EXIT_REASON"_T, selected_thread->m_exit_message).c_str());
}
else
{
if (ImGui::Button("Kill"))
if (ImGui::Button("VIEW_DEBUG_THREADS_KILL"_T.data()))
{
if (selected_thread->m_context.m_stack_size != 0)
selected_thread->kill();
@ -133,9 +141,9 @@ namespace big
}
}
components::small_text("New");
components::small_text("VIEW_DEBUG_THREADS_NEW"_T);
if (ImGui::BeginCombo("Script", selected_script))
if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_SCRIPT"_T.data(), selected_script))
{
for (auto script : all_script_names)
{
@ -150,7 +158,7 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Stack Size", selected_stack_size_str))
if (ImGui::BeginCombo("VIEW_DEBUG_THREADS_STACK_SIZE"_T.data(), selected_stack_size_str))
{
for (auto& p : stack_sizes)
{
@ -170,9 +178,9 @@ namespace big
ImGui::EndCombo();
}
ImGui::Text("Free Stacks: %d", free_stacks);
ImGui::Text(std::format("{}: {}", "VIEW_DEBUG_THREADS_FREE_STACKS"_T, free_stacks).c_str());
components::button("Start", [] {
components::button("SETTINGS_NOTIFY_GTA_THREADS_START"_T, [] {
auto hash = rage::joaat(selected_script);
if (!SCRIPT::DOES_SCRIPT_WITH_NAME_HASH_EXIST(hash))
@ -182,7 +190,7 @@ namespace big
if (MISC::GET_NUMBER_OF_FREE_STACKS_OF_THIS_SIZE(selected_stack_size) == 0)
{
g_notification_service->push_warning("Script Launcher", "No free stacks for this stack size");
g_notification_service->push_warning("VIEW_DEBUG_THREADS"_T.data(), "VIEW_DEBUG_THREADS_NO_FREE_STACKS"_T.data());
}
while (!SCRIPT::HAS_SCRIPT_WITH_NAME_HASH_LOADED(hash))
@ -200,13 +208,13 @@ namespace big
ImGui::SameLine();
components::button("Start With Launcher", [] {
components::button("VIEW_DEBUG_THREADS_START_WITH_LAUNCHER"_T, [] {
auto hash = rage::joaat(selected_script);
auto idx = scripts::launcher_index_from_hash(hash);
if (idx == -1)
{
g_notification_service->push_warning("Script Launcher", "This script cannot be started using am_launcher");
g_notification_service->push_warning("VIEW_DEBUG_THREADS"_T.data(), "VIEW_DEBUG_THREADS_FAILED_WITH_LAUNCHER"_T.data());
return;
}

View File

@ -9,7 +9,7 @@ namespace big
if (ImGui::BeginTabItem("DEBUG_TABS_LOGS"_T.data()))
{
ImGui::Checkbox("DEBUG_LOG_METRICS"_T.data(), &g.debug.logs.metric_logs);
ImGui::Checkbox("Log Packets", &g.debug.logs.packet_logs);// TODO: translate
ImGui::Checkbox("VIEW_DEBUG_LOGS_LOG_PACKETS"_T.data(), &g.debug.logs.packet_logs);
ImGui::Checkbox("DEBUG_LOG_NATIVE_SCRIPT_HOOKS"_T.data(), &g.debug.logs.script_hook_logs);
if (ImGui::TreeNode("DEBUG_LOG_TREE_SCRIPT_EVENT"_T.data()))
@ -32,7 +32,7 @@ namespace big
ImGui::EndListBox();
}
ImGui::Checkbox("Block All", &g.debug.logs.script_event.block_all);
ImGui::Checkbox("VIEW_DEBUG_LOGS_BLOCK_ALL"_T.data(), &g.debug.logs.script_event.block_all);
ImGui::TreePop();
}

View File

@ -107,7 +107,7 @@ namespace big
(plyr->get_ped()->m_ped_task_flag & (uint32_t)ePedTask::TASK_DRIVING) &&
(player_vehicle->m_damage_bits & (uint32_t)eEntityProofs::GOD))
{
mode_str =+ "Vehicle God";
mode_str =+ "VEHICLE_GOD"_T.data();
}
if (!mode_str.empty())

View File

@ -7,21 +7,22 @@ namespace big
{
inline void render_cp_collection_ui()
{
components::sub_title("Checkpoints");
components::sub_title("VIEW_NET_MISSIONS_CHECKPOINTS"_T);
components::button("Start Event##cp_collection", [] {
ImGui::PushID(1);
components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_cp_collection")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection")))
*script_local(script->m_stack, scr_locals::am_cp_collection::broadcast_idx).at(667).as<int*>() = 0;
});
ImGui::SameLine();
components::button("Finish Event##cp_collection", [] {
components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_cp_collection")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection")))
*script_local(script->m_stack, scr_locals::am_cp_collection::broadcast_idx).at(661).as<int*>() = 0;
});
components::button("Win Event", [] {
ImGui::PopID();
components::button("VIEW_NET_MISSIONS_WIN_EVENT"_T, [] {
if (auto checkpoints = gta_util::find_script_thread(RAGE_JOAAT("am_cp_collection")))
*script_local(checkpoints->m_stack, scr_locals::am_cp_collection::player_broadcast_idx)
.at(((CGameScriptHandlerNetComponent*)checkpoints->m_net_component)->m_local_participant_index, 5)
@ -39,7 +40,7 @@ namespace big
}
});
ImGui::SameLine();
components::button("Scramble Checkpoints", [] {
components::button("VIEW_NET_MISSIONS_SCRAMBLE_CHECKPOINTS"_T, [] {
std::vector<Vector3> active_player_positions;
for (auto& plyr : g_player_service->players())

View File

@ -6,20 +6,22 @@ namespace big
{
inline void render_criminal_damage_ui()
{
components::sub_title("Criminal Damage");
components::button("Start Event##criminal_damage", [] {
components::sub_title("CRIMINAL_DAMAGE"_T);
ImGui::PushID(2);
components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_criminal_damage")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage")))
*script_local(script->m_stack, scr_locals::am_criminal_damage::broadcast_idx).at(43).as<int*>() = 0;
});
ImGui::SameLine();
components::button("Finish Event##criminal_damage", [] {
components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_criminal_damage")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage")))
*script_local(script->m_stack, scr_locals::am_criminal_damage::broadcast_idx).at(39).as<int*>() = 0;
});
ImGui::PopID();
components::button("Max Score", [] {
components::button("VIEW_NET_MISSIONS_MAX_SCORE"_T, [] {
if (auto criminal_damage = gta_util::find_script_thread(RAGE_JOAAT("am_criminal_damage")))
*script_local(criminal_damage->m_stack, scr_locals::am_criminal_damage::score_idx).as<int*>() = 999'999'999;
});

View File

@ -40,9 +40,9 @@ namespace big
*script_local(hunt_the_beast_script_thread, scr_locals::am_hunt_the_beast::broadcast_idx).at(1).at(6).as<uint32_t*>();
if (auto beast = g_player_service->get_by_id(beast_player_index))
{
ImGui::Text("%s is the beast", g_player_service->get_by_id(beast_player_index).get()->get_name());
ImGui::Text(std::format("{} {}", g_player_service->get_by_id(beast_player_index).get()->get_name(), "VIEW_NET_MISSIONS_IS_THE_BEAST"_T).c_str());
ImGui::SameLine();
components::button("Set as selected", [beast] {
components::button("VIEW_NET_MISSIONS_SET_AS_SELECTED"_T, [beast] {
g_player_service->set_selected(beast);
});
@ -60,16 +60,13 @@ namespace big
for (int i = 0; i < (num_landmarks ? *num_landmarks : 10); i++)
{
auto script_local_land_mark = *beast_land_mark_list.at(i, 3).as<Vector3*>();
std::string label = std::format("TP To Landmark {} at {} {} {}",
i,
script_local_land_mark.x,
script_local_land_mark.y,
script_local_land_mark.z);
if (ImGui::Selectable(label.data(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list, num_landmarks ? *num_landmarks : 10)))
auto label = std::vformat("VIEW_NET_MISSIONS_TP_TO_LANDMARK"_T, std::make_format_args(i, script_local_land_mark.x, script_local_land_mark.y, script_local_land_mark.z));
if (ImGui::Selectable(label.c_str(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list, num_landmarks ? *num_landmarks : 10)))
{
g_fiber_pool->queue_job([script_local_land_mark, beast] {
teleport::teleport_player_to_coords(g.player.spectating ? beast : g_player_service->get_self(), script_local_land_mark);
});
}
}
ImGui::EndListBox();
}

View File

@ -4,56 +4,36 @@ namespace big
{
inline void render_king_of_the_castle_ui()
{
components::sub_title("King Of The Castle");
components::button("Complete Event##kotc", [] {
components::sub_title("KING_OF_THE_CASTLE"_T);
ImGui::PushID(3);
components::button("VIEW_NET_MISSIONS_START_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle")))
*script_local(script->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(1).at(1).as<int*>() = 0;
});
ImGui::SameLine();
components::button("Expire Event (if possible)##kotc", [] {
components::button("VIEW_NET_MISSIONS_FINISH_EVENT"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle")))
if (auto script = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle")))
*script_local(script->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(1).at(3).as<int*>() = 0;
});
ImGui::PopID();
components::button("Become The King##kotc", [] {
components::button("VIEW_NET_MISSIONS_KOTC_BECOME_THE_KING"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle")))
{
if (auto kotc = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle")))
{
*script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx)
.at(6)
.at(0, 204)
.at(74)
.at(0, 4)
.as<int*>() = 0;
*script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx)
.at(6)
.at(0, 204)
.at(74)
.at(0, 4)
.at(1)
.as<int*>() = self::id;
*script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx)
.at(6)
.at(0, 204)
.at(74)
.at(0, 4)
.at(2)
.as<int*>() = self::id;
*script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx)
.at(6)
.at(0, 204)
.at(74)
.at(0, 4)
.at(3)
.as<float*>() = 999999999.0f;
auto kotc_king = script_local(kotc->m_stack, scr_locals::am_king_of_the_castle::broadcast_idx).at(6).at(0, 204).at(74).at(0, 4);
*kotc_king.as<int*>() = 0;
*kotc_king.at(1).as<int*>() = self::id;
*kotc_king.at(2).as<int*>() = self::id;
*kotc_king.at(3).as<float*>() = 999999999.0f;
}
}
});
ImGui::SameLine();
components::button("Dethrone Everyone##kotc", [] {
components::button("VIEW_NET_MISSIONS_KOTC_DETHRONE_EVERYONE"_T, [] {
if (scripts::force_host(RAGE_JOAAT("am_king_of_the_castle")))
{
if (auto kotc = gta_util::find_script_thread(RAGE_JOAAT("am_king_of_the_castle")))

View File

@ -28,22 +28,22 @@ namespace big
{
mission_found = false;
components::sub_title("Event Starter");
components::sub_title("VIEW_NET_MISSIONS_EVENT_STARTER"_T);
ImGui::BeginGroup();
components::button("Hot Target", [] {
components::button("VIEW_NET_MISSIONS_HOT_TARGET"_T, [] {
scripts::start_launcher_script(36);
});
components::button("Kill List", [] {
components::button("KILL_LIST"_T, [] {
scripts::start_launcher_script(37);
});
components::button("Checkpoints", [] {
components::button("VIEW_NET_MISSIONS_CHECKPOINTS"_T, [] {
scripts::start_launcher_script(39);
});
components::button("Challenges", [] {
components::button("CHALLENGES"_T, [] {
scripts::start_launcher_script(40);
});
components::button("Penned In", [] {
components::button("PENNED_IN"_T, [] {
scripts::start_launcher_script(41);
});
ImGui::EndGroup();
@ -51,19 +51,19 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Hot Property", [] {
components::button("HOT_PROPERTY"_T, [] {
scripts::start_launcher_script(43);
});
components::button("King Of The Castle", [] {
components::button("KING_OF_THE_CASTLE"_T, [] {
scripts::start_launcher_script(45);
});
components::button("Criminal Damage", [] {
components::button("CRIMINAL_DAMAGE"_T, [] {
scripts::start_launcher_script(46);
});
components::button("Hunt The Beast", [] {
components::button("HUNT_THE_BEAST"_T, [] {
scripts::start_launcher_script(47);
});
components::button("Business Battles", [] {
components::button("BUSINESS_BATTLES"_T, [] {
scripts::start_launcher_script(114);
});
ImGui::EndGroup();
@ -71,50 +71,50 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("One-On-One Deathmatch", [] {
components::button("VIEW_NET_MISSIONS_ONE_ON_ONE_DEATHMATCH"_T, [] {
scripts::start_launcher_script(204);
});
components::button("Impromptu Race", [] {
components::button("VIEW_NET_MISSIONS_IMPROMTU_RACE"_T, [] {
scripts::start_launcher_script(16);
});
components::button("Flight School", [] {
components::button("FLIGHT_SCHOOL"_T, [] {
scripts::start_launcher_script(203);
});
components::button("Golf", [] {
components::button("GOLF"_T, [] {
scripts::start_launcher_script(200);
});
components::button("Tutorial", [] {
components::button("TUTORIAL"_T, [] {
scripts::start_launcher_script(20);
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Only works on joining players");
ImGui::SetTooltip("VIEW_NET_MISSIONS_ONLY_WORK_ON_JOINING"_T.data());
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Gunslinger", [] {
components::button("VIEW_NET_MISSIONS_GUNSLINGER"_T, [] {
scripts::start_launcher_script(218);
});
components::button("Space Monkey", [] {
components::button("VIEW_NET_MISSIONS_SPACE_MONKEY"_T, [] {
scripts::start_launcher_script(223);
});
components::button("Wizard", [] {
components::button("VIEW_NET_MISSIONS_WIZARD"_T, [] {
scripts::start_launcher_script(219);
});
components::button("QUB3D", [] {
components::button("VIEW_NET_MISSIONS_QUB3D"_T, [] {
scripts::start_launcher_script(224);
});
components::button("Camhedz", [] {
components::button("VIEW_NET_MISSIONS_CAMHEDZ"_T, [] {
scripts::start_launcher_script(225);
});
ImGui::EndGroup();
ImGui::BeginGroup();
components::button("Ghost Hunt", [] {
components::button("VIEW_NET_MISSIONS_GHOST_HUNT"_T, [] {
scripts::start_launcher_script(174);
});
components::button("Possesed Animals", [] {
components::button("VIEW_NET_MISSIONS_POSESSED_ANIMALS"_T, [] {
scripts::start_launcher_script(179);
});
ImGui::EndGroup();
@ -135,7 +135,7 @@ namespace big
if (!mission_found)
{
ImGui::Text("No active mission");
ImGui::Text("VIEW_NET_MISSIONS_NO_ACTIVE_MISSION"_T.data());
}
}
}

View File

@ -21,7 +21,7 @@ namespace big
void render_rid_joiner()
{
ImGui::BeginGroup();
components::sub_title("RID_JOINER"_T.data());
components::sub_title("RID_JOINER"_T);
if (ImGui::BeginListBox("##ridjoiner", get_listbox_dimensions()))
{
static uint64_t rid = 0;
@ -50,7 +50,7 @@ namespace big
if (g_pointers->m_gta.m_decode_session_info(&info, base64, nullptr))
session::join_session(info);
else
g_notification_service->push_error("Join", "Session info is invalid");
g_notification_service->push_error("RID_JOINER"_T.data(), "VIEW_NET_RIDJOINER_SESSION_INFO_INVALID"_T.data());
});
components::button("COPY_SESSION_INFO"_T, [] {
@ -84,10 +84,10 @@ namespace big
ImGui::Spacing();
for (const auto& session_type : sessions)
for (const auto& [id, name] : sessions)
{
components::selectable(session_type.name, false, [&session_type] {
session::join_type(session_type.id);
components::selectable(name, false, [&id] {
session::join_type(id);
});
}
ImGui::EndListBox();
@ -100,7 +100,7 @@ namespace big
{
ImGui::BeginGroup();
components::sub_title("MISC"_T.data());
components::sub_title("DEBUG_TAB_MISC"_T);
if (ImGui::BeginListBox("##miscsession", get_listbox_dimensions()))
{
ImGui::Checkbox("JOIN_IN_SCTV"_T.data(), &g.session.join_in_sctv_slots);
@ -137,9 +137,9 @@ namespace big
&g.session.unhide_players_from_player_list,
"REVEAL_HIDDEN_PLAYERS_DESC"_T.data());
components::command_button<"sextall">({}, "SEND_SEXT"_T.data());
components::command_button<"sextall">({}, "SEND_SEXT"_T);
ImGui::SameLine();
components::command_button<"fakebanall">({}, "FAKE_BAN_MESSAGE"_T.data());
components::command_button<"fakebanall">({}, "FAKE_BAN_MESSAGE"_T);
ImGui::EndListBox();
}
@ -158,7 +158,7 @@ namespace big
ImGui::Checkbox("AUTO_KICK_CHAT_SPAMMERS"_T.data(), &g.session.kick_chat_spammers);
ImGui::Checkbox("LOG_CHAT_MSG"_T.data(), &g.session.log_chat_messages);
ImGui::Checkbox("LOG_TXT_MSG"_T.data(), &g.session.log_text_messages);
components::input_text_with_hint("##message", "Chat message", msg, sizeof(msg));
components::input_text_with_hint("##message", "VIEW_NET_CHAT_MESSAGE"_T, msg, sizeof(msg));
ImGui::Checkbox("IS_TEAM"_T.data(), &g.session.is_team);
ImGui::SameLine();
@ -178,7 +178,7 @@ namespace big
ImGui::Checkbox("CHAT_COMMANDS"_T.data(), &g.session.chat_commands);
if (g.session.chat_commands)
{
components::small_text("DEFAULT_CMD_PERMISSIONS"_T.data());
components::small_text("DEFAULT_CMD_PERMISSIONS"_T);
if (ImGui::BeginCombo("##defualtchatcommands", COMMAND_ACCESS_LEVELS[g.session.chat_command_default_access_level]))
{
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)
@ -208,7 +208,7 @@ namespace big
{
ImGui::BeginGroup();
components::sub_title("GLOBALS"_T.data());
components::sub_title("GLOBALS"_T);
if (ImGui::BeginListBox("##globals", get_listbox_dimensions()))
{
static int global_wanted_level = 0;
@ -216,14 +216,14 @@ namespace big
ImGui::Checkbox("OFF_THE_RADAR"_T.data(), &g.session.off_radar_all);
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.session.never_wanted_all);
ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g.session.semi_godmode_all);
ImGui::Checkbox("Fix Vehicle", &g.session.vehicle_fix_all);
ImGui::Checkbox("VIEW_NET_SESSION_FIX_VEHICLE"_T.data(), &g.session.vehicle_fix_all);
ImGui::Checkbox("EXPLOSION_KARMA"_T.data(), &g.session.explosion_karma);
ImGui::Checkbox("DAMAGE_KARMA"_T.data(), &g.session.damage_karma);
ImGui::Checkbox("DISABLE_PEDS"_T.data(), &g.session.disable_peds);
ImGui::Checkbox("DISABLE_TRAFFIC"_T.data(), &g.session.disable_traffic);
ImGui::Checkbox("FORCE_THUNDER"_T.data(), &g.session.force_thunder);
components::small_text("WANTED_LVL"_T.data());
components::small_text("WANTED_LVL"_T);
ImGui::SetNextItemWidth(150);
if (ImGui::SliderInt("##wantedlevel", &global_wanted_level, 0, 5))
{
@ -240,7 +240,7 @@ namespace big
ImGui::EndListBox();
}
components::small_text("WARP_TIME"_T.data());
components::small_text("WARP_TIME"_T);
components::button("PLUS_1_MINUTE"_T, [] {
toxic::warp_time_forward_all(60 * 1000);
@ -321,7 +321,7 @@ namespace big
ImGui::Spacing();
components::sub_title("PLAYERS"_T.data());
components::sub_title("PLAYERS"_T);
components::options_modal(
"GRIEFING"_T.data(),
[] {
@ -357,13 +357,13 @@ namespace big
components::command_button<"ceoraidall">({});
ImGui::SameLine();
components::button("TRIGGER_MC_RAID"_T.data(), [] {
components::button("TRIGGER_MC_RAID"_T, [] {
g_player_service->iterate([](auto& plyr) {
toxic::start_activity(plyr.second, eActivityType::BikerDefend);
});
});
ImGui::SameLine();
components::button("TRIGGER_BUNKER_RAID"_T.data(), [] {
components::button("TRIGGER_BUNKER_RAID"_T, [] {
g_player_service->iterate([](auto& plyr) {
toxic::start_activity(plyr.second, eActivityType::GunrunningDefend);
});
@ -498,11 +498,9 @@ namespace big
ImGui::Checkbox("RANDOMIZE_CEO_COLORS"_T.data(), &g.session.randomize_ceo_colors);
ImGui::SameLine();
components::script_patch_checkbox("BLOCK_MUGGERS"_T.data(), &g.session.block_muggers, "BLOCK_MUGGERS_DESC"_T.data());
components::script_patch_checkbox("BLOCK_MUGGERS"_T, &g.session.block_muggers, "BLOCK_MUGGERS_DESC"_T.data());
components::script_patch_checkbox("BLOCK_CEO_RAIDS"_T.data(),
&g.session.block_ceo_raids,
"BLOCK_CEO_RAIDS_DESC"_T.data());
components::script_patch_checkbox("BLOCK_CEO_RAIDS"_T, &g.session.block_ceo_raids, "BLOCK_CEO_RAIDS_DESC"_T);
ImGui::EndGroup();
}

View File

@ -126,7 +126,7 @@ namespace big
if (ImGui::InputScalar("RID"_T.data(), ImGuiDataType_S64, &current_player->rockstar_id)
|| ImGui::Checkbox("IS_MODDER"_T.data(), &current_player->is_modder)
|| ImGui::Checkbox("BLOCK_JOIN"_T.data(), &current_player->block_join)
|| ImGui::Checkbox("Track Player", &current_player->notify_online))
|| ImGui::Checkbox("VIEW_NET_PLAYER_DB_TRACK_PLAYER"_T.data(), &current_player->notify_online))
{
if (current_player->rockstar_id != selected->rockstar_id)
g_player_database_service->update_rockstar_id(selected->rockstar_id, current_player->rockstar_id);
@ -186,7 +186,7 @@ namespace big
}
}
if (ImGui::InputTextMultiline("Notes", note_buffer, sizeof(note_buffer)))
if (ImGui::InputTextMultiline("VIEW_NET_PLAYER_DB_NOTES"_T.data(), note_buffer, sizeof(note_buffer)))
{
current_player->notes = note_buffer;
notes_dirty = true;
@ -194,13 +194,13 @@ namespace big
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
ImGui::Checkbox("Join Redirect", &current_player->join_redirect);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_JOIN_REDIRECT"_T.data(), &current_player->join_redirect);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Anyone trying to join you will join this player instead if they are active. The preference slider will control redirect priority if multiple players with join redirect are active");
ImGui::SetTooltip("VIEW_NET_PLAYER_DB_JOIN_REDIRECT_DESC"_T.data());
if (current_player->join_redirect)
{
ImGui::SliderInt("Preference", &current_player->join_redirect_preference, 1, 10);
ImGui::SliderInt("VIEW_NET_PLAYER_DB_PREFERENCE"_T.data(), &current_player->join_redirect_preference, 1, 10);
}
components::button("JOIN_SESSION"_T, [] {
@ -221,23 +221,23 @@ namespace big
});
};
ImGui::Text("Session Type: %s", player_database_service::get_session_type_str(selected->session_type));
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_SESSION_TYPE"_T, player_database_service::get_session_type_str(selected->session_type)).c_str());
if (selected->session_type != GSType::Invalid && selected->session_type != GSType::Unknown)
{
ImGui::Text("Is Host Of Session: %s", selected->is_host_of_session ? "Yes" : "No");
ImGui::Text("Is Spectating: %s", selected->is_spectating ? "Yes" : "No");
ImGui::Text("In Job Lobby: %s", selected->transition_session_id != -1 ? "Yes" : "No");
ImGui::Text("Is Host Of Job Lobby: %s", selected->is_host_of_transition_session ? "Yes" : "No");
ImGui::Text("Current Mission Type: %s", player_database_service::get_game_mode_str(selected->game_mode));
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_HOST_OF_SESSION"_T, selected->is_host_of_session ? "YES"_T : "NO"_T).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_SPECTATING"_T, selected->is_spectating ? "YES"_T : "NO"_T).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IN_JOB_LOBBY"_T, selected->transition_session_id != -1 ? "YES"_T : "NO"_T).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_IS_HOST_OF_JOB_LOBBY"_T, selected->is_host_of_transition_session ? "YES"_T : "NO"_T).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_NET_PLAYER_DB_CURRENT_MISSION_TYPE"_T, player_database_service::get_game_mode_str(selected->game_mode)).c_str());
if (selected->game_mode != GameMode::None && player_database_service::can_fetch_name(selected->game_mode))
{
ImGui::Text("Current Mission Name: %s", selected->game_mode_name.c_str());
if ((selected->game_mode_name == "Unknown" || selected->game_mode_name.empty())
ImGui::Text("VIEW_NET_PLAYER_DB_CURRENT_MISSION_TYPE"_T.data(), selected->game_mode_name.c_str());
if ((selected->game_mode_name == "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data() || selected->game_mode_name.empty())
&& !selected->game_mode_id.empty())
{
ImGui::SameLine();
components::button("Fetch", [] {
components::button("VIEW_DEBUG_LOCALS_FETCH"_T, [] {
current_player->game_mode_name =
player_database_service::get_name_by_content_id(current_player->game_mode_id);
});
@ -271,9 +271,9 @@ namespace big
if (ImGui::BeginPopupModal("##removeall"))
{
ImGui::Text("Are you sure?");
ImGui::Text("VIEW_NET_PLAYER_DB_ARE_YOU_SURE"_T.data());
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_player_database_service->set_selected(nullptr);
g_player_database_service->get_players().clear();
@ -282,7 +282,7 @@ namespace big
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
ImGui::CloseCurrentPopup();
}
@ -296,21 +296,21 @@ namespace big
g_player_database_service->update_player_states();
});
if (ImGui::TreeNode("Player Tracking"))
if (ImGui::TreeNode("VIEW_NET_PLAYER_DB_PLAYER_TRACKING"_T.data()))
{
if (components::command_checkbox<"player_db_auto_update_states">("Enable"))
if (components::command_checkbox<"player_db_auto_update_states">("ENABLED"_T))
g_player_database_service->start_update_loop();
ImGui::Checkbox("Notify When Online", &g.player_db.notify_when_online);
ImGui::Checkbox("Notify When Joinable", &g.player_db.notify_when_joinable);
ImGui::Checkbox("Notify When Unjoinable", &g.player_db.notify_when_unjoinable);
ImGui::Checkbox("Notify When Offline", &g.player_db.notify_when_offline);
ImGui::Checkbox("Notify On Session Type Change", &g.player_db.notify_on_session_type_change);
ImGui::Checkbox("Notify On Session Change", &g.player_db.notify_on_session_change);
ImGui::Checkbox("Notify On Spectator Change", &g.player_db.notify_on_spectator_change);
ImGui::Checkbox("Notify On Become Host", &g.player_db.notify_on_become_host);
ImGui::Checkbox("Notify On Job Lobby Change", &g.player_db.notify_on_transition_change);
ImGui::Checkbox("Notify On Mission Change", &g.player_db.notify_on_mission_change);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_ONLINE"_T.data(), &g.player_db.notify_when_online);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_JOINABLE"_T.data(), &g.player_db.notify_when_joinable);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_UNJOINABLE"_T.data(), &g.player_db.notify_when_unjoinable);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_WHEN_OFFLINE"_T.data(), &g.player_db.notify_when_offline);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SESSION_TYPE_CHANGE"_T.data(), &g.player_db.notify_on_session_type_change);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SESSION_CHANGE"_T.data(), &g.player_db.notify_on_session_change);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_SPECTATOR_CHANGE"_T.data(), &g.player_db.notify_on_spectator_change);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_ON_BECOME_HOST"_T.data(), &g.player_db.notify_on_become_host);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_JOB_LOBBY_CHANGE"_T.data(), &g.player_db.notify_on_transition_change);
ImGui::Checkbox("VIEW_NET_PLAYER_DB_NOTIFY_MISSION_CHANGE"_T.data(), &g.player_db.notify_on_mission_change);
ImGui::TreePop();
}
@ -334,14 +334,14 @@ namespace big
g_thread_pool->push([] {
if (!g_api_service->get_rid_from_username(new_name, *(uint64_t*)&new_rockstar_id))
{
g_notification_service->push_error("New Player DB Entry", std::format("No user '{}' called could be found.", new_name));
g_notification_service->push_error("GUI_TAB_PLAYER_DATABASE"_T.data(), std::vformat("VIEW_NET_PLAYER_DB_NO_USER_CAN_BE_FOUND"_T, std::make_format_args(new_name)));
new_rockstar_id = 0;
}
});
}
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("Do you know only the name of someone and not their Rockstar ID? Just fill in the username and click \"search\".");
ImGui::SetTooltip("VIEW_NET_PLAYER_DB_TOOLTIP"_T.data());
}
}
}

View File

@ -18,8 +18,7 @@ namespace big
static char name_buf[32];
static char search[64];
static char session_info[0x100]{};
ImGui::Text(std::format("Total sessions found: {}", g_matchmaking_service->get_num_found_sessions()).data());
ImGui::Text(std::format("{}: {}", "VIEW_SESSION_TOTAL_SESSIONS_FOUND"_T.data(), g_matchmaking_service->get_num_found_sessions()).c_str());
ImGui::SetNextItemWidth(300.f);
@ -42,12 +41,11 @@ namespace big
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip(std::format("Num Players: {}\nRegion: {}\nLanguage: {}\nHost: {}",
session.attributes.player_count,
regions[session.attributes.region].name,
languages[session.attributes.language].name,
session.info.m_net_player_data.m_gamer_handle.m_rockstar_id)
.c_str());
auto tool_tip = std::format("{}: {}\n{}: {}\n{}: {}\n{}: {}", "SESSION_BROWSER_NUM_PLAYERS"_T, session.attributes.player_count,
"REGION"_T, regions[session.attributes.region].name,
"LANGUAGE"_T, languages[session.attributes.language].name,
"SESSION_BROWSER_HOST_RID"_T, session.info.m_net_player_data.m_gamer_handle.m_rockstar_id);
ImGui::SetTooltip(tool_tip.c_str());
}
}
}
@ -66,13 +64,13 @@ namespace big
{
auto& session = g_matchmaking_service->get_found_sessions()[selected_session_idx];
ImGui::Text("SESSION_BROWSER_NUM_PLAYERS"_T.data(), session.attributes.player_count);
ImGui::Text("SESSION_BROWSER_DISCRIMINATOR"_T.data(), session.attributes.discriminator);
ImGui::Text("SESSION_BROWSER_REGION"_T.data(), regions[session.attributes.region].name);
ImGui::Text("SESSION_BROWSER_LANGUAGE"_T.data(), languages[session.attributes.language].name);
ImGui::Text(std::format("{}: {}", "SESSION_BROWSER_NUM_PLAYERS"_T, session.attributes.player_count).c_str());
ImGui::Text(std::format("{}: 0x{:X}", "SESSION_BROWSER_DISCRIMINATOR"_T, session.attributes.discriminator).c_str());
ImGui::Text(std::format("{}: {}", "REGION"_T, regions[session.attributes.region].name).c_str());
ImGui::Text(std::format("{}: {}", "LANGUAGE"_T, languages[session.attributes.language].name).c_str());
auto& data = session.info.m_net_player_data;
ImGui::Text("SESSION_BROWSER_HOST_RID"_T.data(), data.m_gamer_handle.m_rockstar_id);
ImGui::Text(std::format("{}: {}", "SESSION_BROWSER_HOST_RID"_T, data.m_gamer_handle.m_rockstar_id).c_str());
components::button("COPY_SESSION_INFO"_T, [] {
ImGui::SetClipboardText(session_info);
@ -155,7 +153,8 @@ namespace big
if (g.session_browser.pool_filter_enabled)
{
ImGui::SameLine();
ImGui::Combo("###pooltype", &g.session_browser.pool_filter, "Normal\0Bad Sport");
static const std::string pool_filter_options = std::string("NORMAL"_T.data()) + '\0' + std::string("BAD_SPORT"_T.data());
ImGui::Combo("###pooltype", &g.session_browser.pool_filter, pool_filter_options.c_str());
}
ImGui::TreePop();
@ -163,9 +162,11 @@ namespace big
if (ImGui::TreeNode("SORTING"_T.data()))
{
ImGui::Combo("SORT_BY"_T.data(), &g.session_browser.sort_method, "Off\0Player Count");
static const std::string sort_by_options = std::string("OFF"_T.data()) + '\0' + std::string("PLAYER_COUNT"_T.data());
static const std::string sort_direction_options = std::string("ASCENDING"_T.data()) + '\0' + std::string("DESCENDING"_T.data());
ImGui::Combo("SORT_BY"_T.data(), &g.session_browser.sort_method, sort_by_options.c_str());
if (g.session_browser.sort_method != 0)
ImGui::Combo("DIRECTION"_T.data(), &g.session_browser.sort_direction, "Ascending\0Descending");
ImGui::Combo("DIRECTION"_T.data(), &g.session_browser.sort_direction, sort_direction_options.c_str());
ImGui::TreePop();
}

View File

@ -54,7 +54,8 @@ namespace big
if (g.spoofing.spoof_bad_sport)
{
ImGui::SameLine();
if (ImGui::Combo("###badsport_select", &g.spoofing.badsport_type, "Clean Player\0Dirty Player\0Bad Sport"))
static const std::string badsport_options = std::string("CLEAN_PLAYER"_T.data()) + '\0' + std::string("VIEW_SPOOFING_DIRTY_PLAYER"_T.data()) + '\0' + std::string("BAD_SPORT"_T.data());
if (ImGui::Combo("###badsport_select", &g.spoofing.badsport_type, badsport_options.c_str()))
{
*g_pointers->m_gta.m_force_player_card_refresh = true;
}
@ -148,11 +149,11 @@ namespace big
ImGui::InputInt("###player_count", &g.spoofing.session_player_count);
}
ImGui::Checkbox("Spoof Session Bad Sport Status", &g.spoofing.spoof_session_bad_sport_status);
ImGui::Checkbox("VIEW_SPOOFING_SPOOF_SESSION_BAD_SPORT_STATUS"_T.data(), &g.spoofing.spoof_session_bad_sport_status);
if (g.spoofing.spoof_session_bad_sport_status)
{
ImGui::SameLine();
ImGui::Checkbox("Badsport", &g.spoofing.session_bad_sport);
ImGui::Checkbox("VIEW_SPOOFING_BADSPORT"_T.data(), &g.spoofing.session_bad_sport);
}
}
}

View File

@ -18,30 +18,30 @@ namespace big
{
switch (type)
{
case 1: return "Open";
case 2: return "Moderate";
case 3: return "Strict";
case 1: return "VIEW_PLAYER_INFO_NAT_TYPE_OPEN"_T.data();
case 2: return "VIEW_PLAYER_INFO_NAT_TYPE_MODERATE"_T.data();
case 3: return "VIEW_PLAYER_INFO_NAT_TYPE_STRICT"_T.data();
}
return "Unknown";
return "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data();
}
const char* get_connection_type_str(int type)
{
switch (type)
{
case 1: return "Direct";
case 2: return "Relay";
case 3: return "Peer Relay";
case 1: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_DIRECT"_T.data();
case 2: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_RELAY"_T.data();
case 3: return "VIEW_PLAYER_INFO_CONNECTION_TYPE_PEER_RELAY"_T.data();
}
return "Unknown";
return "VIEW_NET_PLAYER_DB_GAME_MODE_UNKNOWN"_T.data();
}
void view::player_info()
{
ImGui::BeginGroup();
components::sub_title("Info");
components::sub_title("INFO"_T);
if (ImGui::BeginListBox("##infobox", get_listbox_dimensions()))
{
@ -62,7 +62,7 @@ namespace big
}
components::options_modal(
"Extra Info",
"VIEW_PLAYER_INFO_EXTRA_INFO"_T.data(),
[ped_health, ped_maxhealth] {
ImGui::BeginGroup();
@ -79,22 +79,21 @@ namespace big
if (boss_goon.Language >= 0 && boss_goon.Language < 13)
ImGui::Text("PLAYER_INFO_LANGUAGE"_T.data(), languages[boss_goon.Language].name);
ImGui::Text("PLAYER_INFO_CEO_NAME"_T.data(), boss_goon.GangName);
ImGui::Text("PLAYER_INFO_MC_NAME"_T.data(), boss_goon.ClubhouseName);
ImGui::Text("PLAYER_INFO_WALLET"_T.data(), wallet);
ImGui::Text("PLAYER_INFO_BANK"_T.data(), money - wallet);
ImGui::Text("PLAYER_INFO_TOTAL_MONEY"_T.data(), money);
ImGui::Text("PLAYER_INFO_RANK"_T.data(), stats.Rank, stats.RP);
ImGui::Text("Health: %d (MaxHealth: %d)", ped_health, ped_maxhealth); // TODO: translate
ImGui::Text("PLAYER_INFO_KD"_T.data(), stats.KdRatio);
ImGui::Text("PLAYER_INFO_KILLS"_T.data(), stats.KillsOnPlayers);
ImGui::Text("PLAYER_INFO_DEATHS"_T.data(), stats.DeathsByPlayers);
ImGui::Text("PLAYER_INFO_PROSTITUTES"_T.data(), stats.ProstitutesFrequented);
ImGui::Text("PLAYER_INFO_LAP_DANCES"_T.data(), stats.LapDancesBought);
ImGui::Text("PLAYER_INFO_MISSIONS_CREATED"_T.data(), stats.MissionsCreated);
ImGui::Text("PLAYER_INFO_METLDOWN_COMPLETE"_T.data(),
scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T.data() :
"NO"_T.data()); // curious to see if anyone has actually played singleplayer
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_CEO_NAME"_T, boss_goon.GangName.Data).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_MC_NAME"_T, boss_goon.ClubhouseName.Data).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_WALLET"_T, wallet).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_BANK"_T, money - wallet).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_TOTAL_MONEY"_T, money).c_str());
ImGui::Text(std::format("{}: {} ({} {})", "PLAYER_INFO_RANK"_T, stats.Rank, "PLAYER_INFO_RANK_RP"_T, stats.RP).c_str());
ImGui::Text(std::format("{}: {} ({} {})", "VIEW_PLAYER_INFO_HEALTH"_T, ped_health, "VIEW_PLAYER_INFO_MAXHEALTH"_T, ped_maxhealth).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_KD"_T, stats.KdRatio).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_KILLS"_T, stats.KillsOnPlayers).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_DEATHS"_T, stats.DeathsByPlayers).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_PROSTITUTES"_T, stats.ProstitutesFrequented).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_LAP_DANCES"_T, stats.LapDancesBought).c_str());
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_MISSIONS_CREATED"_T, stats.MissionsCreated).c_str());
auto meltdown_completed = scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T : "NO"_T;
ImGui::Text(std::format("{}: {}", "PLAYER_INFO_METLDOWN_COMPLETE"_T, meltdown_completed).c_str());
}
ImGui::EndGroup();
@ -103,38 +102,38 @@ namespace big
ImGui::BeginGroup();
ImGui::Text("NAT Type: %s", get_nat_type_str(g_player_service->get_selected()->get_net_data()->m_nat_type));
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NAT_TYPE"_T, get_nat_type_str(g_player_service->get_selected()->get_net_data()->m_nat_type)).c_str());
if (auto peer = g_player_service->get_selected()->get_connection_peer())
{
ImGui::Text("Connection Type: %s", get_connection_type_str(peer->m_peer_address.m_connection_type));
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_CONNECTION_TYPE"_T, get_connection_type_str(peer->m_peer_address.m_connection_type)).c_str());
if (peer->m_peer_address.m_connection_type == 2)
{
auto ip = peer->m_relay_address.m_relay_address;
ImGui::Text("Relay IP: %d.%d.%d.%d", ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4);
ImGui::Text(std::format("{}: {}.{}.{}.{}", "VIEW_PLAYER_INFO_RELAY_IP"_T, ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4).c_str());
}
else if (peer->m_peer_address.m_connection_type == 3)
{
auto ip = peer->m_peer_address.m_relay_address;
ImGui::Text("Peer Relay IP: %d.%d.%d.%d", ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4);
ImGui::Text(std::format("{}: {}.{}.{}.{}", "VIEW_PLAYER_INFO_PEER_RELAY_IP"_T, ip.m_field1, ip.m_field2, ip.m_field3, ip.m_field4).c_str());
}
ImGui::Text("Num Messages Sent: %d", peer->m_num_messages_batched);
ImGui::Text("Num Reliables Sent: %d", peer->m_num_reliable_messages_batched);
ImGui::Text("Num Reliables Resent: %d", peer->m_num_resent_reliable_messages_batched);
ImGui::Text("Num Encryption Attempts: %d", peer->m_num_encryption_attempts);
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_MESSAGES_SENT"_T, peer->m_num_messages_batched).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_RELIABLES_SENT"_T, peer->m_num_reliable_messages_batched).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_RELIABLES_RESENT"_T, peer->m_num_resent_reliable_messages_batched).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_PLAYER_INFO_NUM_ENCRYPTION_ATTEMPTS"_T, peer->m_num_encryption_attempts).c_str());
}
ImGui::EndGroup();
ImGui::Separator();
ImGui::Checkbox("Block Explosions", &g_player_service->get_selected()->block_explosions);
ImGui::Checkbox("Block Clone Creates", &g_player_service->get_selected()->block_clone_create);
ImGui::Checkbox("Block Clone Syncs", &g_player_service->get_selected()->block_clone_sync);
ImGui::Checkbox("Block Network Events", &g_player_service->get_selected()->block_net_events);
ImGui::Checkbox("Log Clones", &g_player_service->get_selected()->log_clones);
ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_EXPLOSIONS"_T.data(), &g_player_service->get_selected()->block_explosions);
ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_CLONE_CREATE"_T.data(), &g_player_service->get_selected()->block_clone_create);
ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_CLONE_SYNC"_T.data(), &g_player_service->get_selected()->block_clone_sync);
ImGui::Checkbox("VIEW_PLAYER_INFO_BLOCK_NETWORK_EVENTS"_T.data(), &g_player_service->get_selected()->block_net_events);
ImGui::Checkbox("VIEW_PLAYER_INFO_LOG_CLONES"_T.data(), &g_player_service->get_selected()->log_clones);
ImGui::Separator();
@ -162,7 +161,7 @@ namespace big
}
},
false,
"Extra Info");
"VIEW_PLAYER_INFO_EXTRA_INFO"_T.data());
ImGui::SameLine();
@ -173,7 +172,7 @@ namespace big
ImGui::SameLine();
if (ImGui::SmallButton("SC Profile"))
if (ImGui::SmallButton("VIEW_PLAYER_INFO_SC_PROFILE"_T.data()))
g_fiber_pool->queue_job([] {
uint64_t gamerHandle[13];
NETWORK::NETWORK_HANDLE_FROM_PLAYER(g_player_service->get_selected()->id(), (Any*)&gamerHandle, 13);
@ -182,7 +181,7 @@ namespace big
if (CPlayerInfo* player_info = g_player_service->get_selected()->get_player_info(); player_info != nullptr)
{
ImGui::Text("PLAYER_INFO_WANTED_LEVEL"_T.data(), player_info->m_wanted_level);
ImGui::Text(std::format("{}: {}", "WANTED_LEVEL"_T, player_info->m_wanted_level).c_str());
}
if (ped_damage_bits & (uint32_t)eEntityProofs::GOD)
@ -201,7 +200,7 @@ namespace big
}
if (ped_health > 328 || ped_maxhealth > 328 && !(uint32_t)eEntityProofs::EXPLOSION && !(uint32_t)eEntityProofs::BULLET)
{
mode_str += "Unnatural Health";
mode_str += "VIEW_PLAYER_INFO_UNNATURAL_HEALTH"_T.data();
}
}
@ -294,20 +293,20 @@ namespace big
else
{
if (net_player_data->m_force_relays)
ImGui::Text("IP Address: Hidden");
ImGui::Text("VIEW_PLAYER_INFO_IP_HIDDEN"_T.data());
else
ImGui::Text("IP Address: Unknown");
ImGui::Text("VIEW_PLAYER_INFO_IP_UNKNOWN"_T.data());
auto cxn_type = g_player_service->get_selected()->get_connection_peer() ?
g_player_service->get_selected()->get_connection_peer()->m_peer_address.m_connection_type :
0;
if (g.protections.force_relay_connections && ImGui::IsItemHovered())
ImGui::SetTooltip("IP addresses cannot be seen when Force Relay Connections is enabled");
ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_FORCE_RELAY_TOOLTIP"_T.data());
else if (cxn_type == 2 && ImGui::IsItemHovered())
ImGui::SetTooltip("Cannot retrieve IP address since this player is connected through dedicated servers");
ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_RELAY_TOOLTIP"_T.data());
else if (cxn_type == 3 && ImGui::IsItemHovered())
ImGui::SetTooltip("Cannot retrieve IP address since this player is connected through another player");
ImGui::SetTooltip("VIEW_PLAYER_INFO_IP_PEER_RELAY_TOOLTIP"_T.data());
}
}

View File

@ -7,7 +7,7 @@ namespace big
void view::player_kick()
{
ImGui::BeginGroup();
components::sub_title("Kick");
components::sub_title("KICK"_T);
if (ImGui::BeginListBox("##kick", get_listbox_dimensions()))
{
auto const is_session_host = [] {
@ -15,7 +15,7 @@ namespace big
};
if (!g_player_service->get_self()->is_host())
ImGui::Text("Host and breakup kick require session host");
ImGui::Text("VIEW_PLAYER_KICK_HOST_AND_BREAKUP_KICK_REQUIRE_SESSION_HOST"_T.data());
ImGui::BeginDisabled(!g_player_service->get_self()->is_host());

View File

@ -9,7 +9,7 @@ namespace big
void view::player_misc()
{
ImGui::BeginGroup();
components::sub_title("Misc");
components::sub_title("DEBUG_TAB_MISC"_T);
if (ImGui::BeginListBox("##misc", get_listbox_dimensions()))
{
components::player_command_button<"joinceo">(g_player_service->get_selected());
@ -35,7 +35,7 @@ namespace big
ImGui::SameLine();
ImGui::Checkbox("Fix Vehicle", &g_player_service->get_selected()->fix_vehicle);
ImGui::Checkbox("VIEW_NET_SESSION_FIX_VEHICLE"_T.data(), &g_player_service->get_selected()->fix_vehicle);
ImGui::EndListBox();
}

View File

@ -11,7 +11,7 @@ namespace big
{
ImGui::BeginGroup();
components::sub_title("Teleport");
components::sub_title("GUI_TAB_TELEPORT"_T);
if (ImGui::BeginListBox("##teleport", get_listbox_dimensions()))
{
@ -20,14 +20,14 @@ namespace big
components::player_command_button<"playervehtp">(g_player_service->get_selected());
ImGui::SameLine();
components::player_command_button<"bring">(g_player_service->get_selected());
components::button("Waypoint", [] {
components::button("VIEW_PLAYER_TELEPORT_WAYPOINT"_T, [] {
Vector3 location;
if (blip::get_blip_location(location, (int)BlipIcons::Waypoint))
entity::load_ground_at_3dcoord(location), teleport::teleport_player_to_coords(g_player_service->get_selected(), location);
});
components::options_modal(
"Interior Teleport",
"VIEW_PLAYER_TELEPORT_INTERIOR_TELEPORT"_T.data(),
[] {
components::player_command_button<"intkick">(g_player_service->get_selected(), {});
if (ImGui::BeginCombo("##apartment", apartment_names[g.session.send_to_apartment_idx]))
@ -92,42 +92,42 @@ namespace big
toxic::start_activity(g_player_service->get_selected(), eActivityType::Skydive);
});
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {81}, "TP To MOC");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {81}, "VIEW_PLAYER_TELEPORT_TP_TO_MOC"_T);
components::player_command_button<"interiortp">(g_player_service->get_selected(), {123}, "TP To Casino");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {123}, "VIEW_PLAYER_TELEPORT_TP_TO_CASINO"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {124}, "TP To Penthouse");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {124}, "VIEW_PLAYER_TELEPORT_TP_TO_PENTHOUSE"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {128}, "TP To Arcade");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {128}, "VIEW_PLAYER_TELEPORT_TP_TO_ARCADE"_T);
components::player_command_button<"interiortp">(g_player_service->get_selected(), {146}, "TP To Music Locker");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {146}, "VIEW_PLAYER_TELEPORT_TP_TO_MUSIC_LOCKER"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {148}, "TP To Record A Studios");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {148}, "VIEW_PLAYER_TELEPORT_TP_TO_RECORD_A_STUDIOS"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {149}, "TP To Custom Auto Shop");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {149}, "VIEW_PLAYER_TELEPORT_TP_TO_CUSTOM_AUTO_SHOP"_T);
components::player_command_button<"interiortp">(g_player_service->get_selected(), {155}, "TP To Agency");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {155}, "VIEW_PLAYER_TELEPORT_TP_TO_AGENCY"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {160}, "TP To Freakshop");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {160}, "VIEW_PLAYER_TELEPORT_TP_TO_FREAKSHOP"_T);
ImGui::SameLine();
components::player_command_button<"interiortp">(g_player_service->get_selected(), {161}, "TP To Multi Floor Garage");
components::player_command_button<"interiortp">(g_player_service->get_selected(), {161}, "VIEW_PLAYER_TELEPORT_TP_TO_MULTI_FLOOR_GARAGE"_T);
},
false,
"Interior");
"INTERIOR"_T.data());
if (g_player_service->get_selected()->get_ped())
{
static float new_location[3];
auto& current_location = *reinterpret_cast<float(*)[3]>(g_player_service->get_selected()->get_ped()->get_position());
components::small_text("Custom TP");
components::small_text("VIEW_PLAYER_TELEPORT_CUSTOM_TP"_T);
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##customlocation", new_location);
components::button("TP", [] {
components::button("GUI_TAB_TELEPORT"_T, [] {
teleport::teleport_player_to_coords(g_player_service->get_selected(), *reinterpret_cast<rage::fvector3*>(&new_location));
});
ImGui::SameLine();
if (ImGui::Button("Get current"))
if (ImGui::Button("VIEW_PLAYER_TELEPORT_GET_CURRENT"_T.data()))
{
std::copy(std::begin(current_location), std::end(current_location), std::begin(new_location));
}

View File

@ -10,7 +10,7 @@ namespace big
void view::player_toxic()
{
ImGui::BeginGroup();
components::sub_title("Toxic");
components::sub_title("TOXIC"_T);
if (ImGui::BeginListBox("##toxic", get_listbox_dimensions()))
{
components::player_command_button<"kill">(g_player_service->get_selected(), {});
@ -19,7 +19,7 @@ namespace big
components::player_command_button<"ceokick">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::button("Gooch Test", [] {
components::button("VIEW_PLAYER_TOXIC_GOOCH_TEST"_T, [] {
*scr_globals::gooch.at(289).at(1).as<Player*>() = g_player_service->get_selected()->id();
scripts::start_launcher_script(171);
});
@ -34,11 +34,11 @@ namespace big
components::player_command_button<"ceoraid">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::button("Trigger MC Raid", [] {
components::button("TRIGGER_MC_RAID"_T, [] {
toxic::start_activity(g_player_service->get_selected(), eActivityType::BikerDefend);
});
ImGui::SameLine();
components::button("Trigger Bunker Raid", [] {
components::button("TRIGGER_BUNKER_RAID"_T, [] {
toxic::start_activity(g_player_service->get_selected(), eActivityType::GunrunningDefend);
});

View File

@ -5,7 +5,7 @@ namespace big
void view::player_vehicle()
{
ImGui::BeginGroup();
components::sub_title("Vehicle");
components::sub_title("VEHICLE"_T);
if (ImGui::BeginListBox("##veh", get_listbox_dimensions()))
{
components::player_command_button<"vehkick">(g_player_service->get_selected(), {});

View File

@ -12,17 +12,20 @@ namespace big
player_ptr current_player = g_player_service->get_selected();
navigation_struct& player_tab = g_gui_service->get_navigation().at(tabs::PLAYER);
strcpy(player_tab.name, current_player->get_name());
strcat(player_tab.name, std::format(" ({})", std::to_string(current_player->id())).data());
std::string name_appendage{};
if (current_player->is_host())
strcat(player_tab.name, " [HOST]");
{
name_appendage += std::format(" [{}]", "VIEW_PLAYER_IS_HOST"_T);
}
if (current_player->is_friend())
strcat(player_tab.name, " [FRIEND]");
{
name_appendage += std::format(" [{}]", "VIEW_PLAYER_IS_FRIEND"_T);
}
if (current_player->is_modder)
strcat(player_tab.name, " [MOD]");
{
name_appendage += std::format(" [{}]", "MOD"_T);
}
strcpy(player_tab.name, std::format("{} ({}){}", current_player->get_name(), current_player->id(), name_appendage).c_str());
view::player_info();
ImGui::SameLine();

View File

@ -9,7 +9,7 @@ namespace big
{
ImGui::BeginGroup();
static std::string category = "Default";
static std::string category = "DEFAULT"_T.data();
static ped_animation deletion_ped_animation{};
if (!std::string(deletion_ped_animation.name).empty())
@ -17,18 +17,18 @@ namespace big
if (ImGui::BeginPopupModal("##deletepedanimation", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove))
{
ImGui::Text(std::format("Are you sure you want to delete {}", deletion_ped_animation.name).data());
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_ped_animation.name);
ImGui::Spacing();
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_ped_animation_service.delete_saved_animation(category, deletion_ped_animation);
deletion_ped_animation.name = "";
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
deletion_ped_animation.name = "";
ImGui::CloseCurrentPopup();
@ -38,37 +38,37 @@ namespace big
}
ImGui::PushItemWidth(250);
components::input_text_with_hint("##dict", "Dict", g_ped_animation_service.current_animation.dict);
components::input_text_with_hint("##dict", "DICT"_T, g_ped_animation_service.current_animation.dict);
components::options_modal(
"Debug animations",
"VIEW_SELF_ANIMATIONS_DEBUG_ANIMATIONS"_T.data(),
[] {
debug::animations(&g_ped_animation_service.current_animation.dict, &g_ped_animation_service.current_animation.anim);
},
true,
"List From Debug");
components::input_text_with_hint("##anim", "Anim", g_ped_animation_service.current_animation.anim);
"VIEW_SELF_ANIMATIONS_LIST_FROM_DEBUG"_T.data());
components::input_text_with_hint("##anim", "ANIMATION"_T, g_ped_animation_service.current_animation.anim);
ImGui::SameLine();
components::button("Play", [] {
components::button("VIEW_DEBUG_ANIMATIONS_PLAY"_T.data(), [] {
g_ped_animation_service.play_saved_ped_animation(g_ped_animation_service.current_animation, self::ped);
});
ImGui::SameLine();
components::button("Stop", [] {
components::button("VIEW_DEBUG_ANIMATIONS_STOP"_T.data(), [] {
TASK::CLEAR_PED_TASKS(self::ped);
});
if (ImGui::TreeNode("Advanced Options"))
if (ImGui::TreeNode("VIEW_SELF_ANIMATIONS_ADVANCED_OPTIONS"_T.data()))
{
ImGui::SliderFloat("Blend in", &g_ped_animation_service.current_animation.blendin, -5, 10);
ImGui::SliderFloat("Blend out", &g_ped_animation_service.current_animation.blendout, -5, 10);
ImGui::InputInt("Duration in ms", &g_ped_animation_service.current_animation.time_to_play);
ImGui::SliderFloat("VIEW_SELF_ANIMATIONS_BLEND_IN"_T.data(), &g_ped_animation_service.current_animation.blendin, -5, 10);
ImGui::SliderFloat("VIEW_SELF_ANIMATIONS_BLEND_OUT"_T.data(), &g_ped_animation_service.current_animation.blendout, -5, 10);
ImGui::InputInt("VIEW_SELF_ANIMATIONS_DURATION"_T.data(), &g_ped_animation_service.current_animation.time_to_play);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("-1 will make the duration indefinite, assuming it is looped");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_DURATION_TOOLTIP"_T.data());
ImGui::PopItemWidth();
ImGui::Checkbox("Ambient", &g_ped_animation_service.current_animation.ambient);
ImGui::Checkbox("VIEW_SELF_ANIMATIONS_AMBIENT"_T.data(), &g_ped_animation_service.current_animation.ambient);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Current location and rotation will be saved and used");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_AMBIENT_TOOLTIP"_T.data());
if (g_ped_animation_service.current_animation.ambient)
{
@ -93,71 +93,72 @@ namespace big
ImGui::BeginGroup(); //Regular flags
ImGui::CheckboxFlags("Looped", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::LOOPING));
ImGui::CheckboxFlags("Hold Last Frame", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HOLD_LAST_FRAME));
ImGui::CheckboxFlags("Uninterruptable", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::NOT_INTERRUPTABLE));
ImGui::CheckboxFlags("Only Upperbody", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::UPPERBODY));
ImGui::CheckboxFlags("Secondary slot", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::SECONDARY));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_LOOPED"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::LOOPING));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_HOLD_LAST_FRAME"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HOLD_LAST_FRAME));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_UNINTERRUPTABLE"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::NOT_INTERRUPTABLE));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_ONLY_UPPERBODY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::UPPERBODY));
ImGui::CheckboxFlags("SECONDARY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::SECONDARY));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Allow primary animations to run simultaniously, such as walking");
ImGui::CheckboxFlags("Realize Animation Orientation", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::REORIENT_WHEN_FINISHED));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SECONDARY_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_REALIZE_ANIMATION_ORIENTATION"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::REORIENT_WHEN_FINISHED));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Use the final orientation achieved in the animation");
ImGui::CheckboxFlags("Hide Weapon", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HIDE_WEAPON));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_REALIZE_ANIMATION_ORIENTATION_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_HIDE_WEAPON"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::HIDE_WEAPON));
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
//Sync flags
ImGui::CheckboxFlags("Sync In", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_IN));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_IN"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_IN));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition into the animation, for example from walking");
ImGui::CheckboxFlags("Sync Out", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_OUT));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_IN_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_OUT"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_OUT));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition out of the animation, for example to continue walking");
ImGui::CheckboxFlags("Sync Continuous", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_CONTINUOUS));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_OUT_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_SYNC_CONTINUOUS"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TAG_SYNC_CONTINUOUS));
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Seamless transition during the animation, especially usefull for upperbody animations");
ImGui::CheckboxFlags("Force Start", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::FORCE_START));
ImGui::CheckboxFlags("Disable Colission", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TURN_OFF_COLLISION));
ImGui::CheckboxFlags("Override Physics", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::OVERRIDE_PHYSICS));
ImGui::CheckboxFlags("Ignore Gravity", reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::IGNORE_GRAVITY));
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_SYNC_CONTINUOUS_TOOLTIP"_T.data());
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_FORCE_START"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::FORCE_START));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_DISABLE_COLLISION"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::TURN_OFF_COLLISION));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_OVERRIDE_PHYSICS"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::OVERRIDE_PHYSICS));
ImGui::CheckboxFlags("VIEW_SELF_ANIMATIONS_IGNORE_GRAVITY"_T.data(), reinterpret_cast<unsigned int*>(&g_ped_animation_service.current_animation.flags), static_cast<unsigned int>(animations::anim_flags::IGNORE_GRAVITY));
ImGui::EndGroup();
ImGui::TreePop();
}
ImGui::SeparatorText("Saving");
ImGui::SeparatorText("CREATOR_SAVE_TO_FILE"_T.data());
components::input_text_with_hint("Category", "Category", category);
components::input_text_with_hint("Name", "Name", g_ped_animation_service.current_animation.name);
components::input_text_with_hint("VIEW_SELF_ANIMATIONS_CATEGORY"_T, "VIEW_SELF_ANIMATIONS_CATEGORY_DESC"_T, category);
components::input_text_with_hint("NAME"_T, "FILE_NAME"_T, g_ped_animation_service.current_animation.name);
static auto save_response = [=]() -> bool {
if (!STREAMING::DOES_ANIM_DICT_EXIST(g_ped_animation_service.current_animation.dict.data()))
{
g_notification_service->push_warning("Animations",
std::format("Dict with the name {} does not exist", g_ped_animation_service.current_animation.dict));
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(),
std::vformat("VIEW_SELF_ANIMATIONS_DICT_DOES_NOT_EXIST"_T, std::make_format_args(g_ped_animation_service.current_animation.dict)));
return false;
}
if (g_ped_animation_service.get_animation_by_name(g_ped_animation_service.current_animation.name))
{
g_notification_service->push_warning("Animations",
std::format("Animation with the name {} already exists", g_ped_animation_service.current_animation.name));
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(),
std::vformat("VIEW_SELF_ANIMATIONS_ANIM_ALREADY_EXISTS"_T, std::make_format_args(g_ped_animation_service.current_animation.name)));
return false;
}
if (category.empty())
{
g_notification_service->push_warning("Animations", "Category can't be empty");
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(), "VIEW_SELF_ANIMATIONS_CATEGORY_EMPTY_ERROR"_T.data());
return false;
}
if (g_ped_animation_service.current_animation.anim.empty())
{
g_notification_service->push_warning("Animations", "Animation name can't be empty");
g_notification_service->push_warning("GUI_TAB_ANIMATIONS"_T.data(), "VIEW_SELF_ANIMATIONS_ANIM_EMPTY_ERROR"_T.data());
return false;
}
@ -166,34 +167,35 @@ namespace big
ImGui::SameLine();
components::button("Save", [] {
components::button("SAVE"_T, [] {
if (save_response())
g_ped_animation_service.save_new_animation(category, g_ped_animation_service.current_animation);
});
ImGui::EndGroup();
ImGui::SeparatorText("Saved");
components::button("Refresh", [] {
ImGui::SeparatorText("VIEW_SELF_ANIMATIONS_SAVED"_T.data());
components::button("REFRESH"_T, [] {
g_ped_animation_service.fetch_saved_animations();
});
components::small_text("Double click to play\nShift click to delete");
components::small_text("VIEW_SELF_ANIMATIONS_HINT"_T);
components::small_text("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T);
ImGui::SameLine();
ImGui::Checkbox("Prompt Ambient", &g.self.prompt_ambient_animations);
ImGui::Checkbox("VIEW_SELF_ANIMATIONS_PROMPT_AMBIENT"_T.data(), &g.self.prompt_ambient_animations);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Ambient animations will be prompted if you are close to one");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_PROMPT_AMBIENT_TOOLTIP"_T.data());
static std::string filter;
ImGui::BeginGroup();
components::input_text_with_hint("##filter", "Search", filter);
components::input_text_with_hint("##filter", "SEARCH"_T, filter);
ImGui::BeginGroup();
components::small_text("Categories");
components::small_text("VIEW_SELF_ANIMATIONS_CATEGORIES"_T);
if (ImGui::BeginListBox("##categories", {200, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.4)}))
{
for (auto& l : g_ped_animation_service.all_saved_animations | std::ranges::views::keys)
@ -208,7 +210,7 @@ namespace big
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::small_text("Animations");
components::small_text("GUI_TAB_ANIMATIONS"_T);
if (ImGui::BeginListBox("##animations", {200, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.4)}))
{
if (g_ped_animation_service.all_saved_animations.find(category)
@ -246,10 +248,10 @@ namespace big
if (p.name.length() > 25)
ImGui::Text(p.name.data());
ImGui::Text(std::format("Dict: {}\nAnim: {}", p.dict, p.anim).data());
ImGui::Text(std::format("{}: {}\n{}: {}", "DICT"_T.data(), p.dict, "ANIMATION"_T.data(), p.anim).c_str());
if (p.ambient)
ImGui::BulletText("Ambient animation");
ImGui::BulletText("VIEW_SELF_ANIMATIONS_AMBIENT_ANIMATION"_T.data());
ImGui::EndTooltip();
}
}

View File

@ -49,18 +49,18 @@ namespace big
if (ImGui::BeginPopupModal("##deletelocation", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove))
{
ImGui::Text("Are you sure you want to delete %s?", deletion_telelocation.name);
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_telelocation.name);
ImGui::Spacing();
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_custom_teleport_service.delete_saved_location(category, deletion_telelocation.name);
deletion_telelocation.name = "";
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
deletion_telelocation.name = "";
ImGui::CloseCurrentPopup();
@ -70,18 +70,18 @@ namespace big
}
ImGui::PushItemWidth(300);
components::input_text_with_hint("Category", "Category", category);
components::input_text_with_hint("Location name", "New location", new_location_name);
components::input_text_with_hint("VIEW_SELF_ANIMATIONS_CATEGORY"_T, "VIEW_SELF_ANIMATIONS_CATEGORY_DESC"_T, category);
components::input_text_with_hint("VIEW_SELF_CUSTOM_TELEPORT_LOCATION"_T, "VIEW_SELF_CUSTOM_TELEPORT_LOCATION_DESC"_T, new_location_name);
ImGui::PopItemWidth();
components::button("Save current location", [] {
components::button("VIEW_SELF_CUSTOM_TELEPORT_SAVE_CURRENT_LOCATION"_T, [] {
if (new_location_name.empty())
{
g_notification_service->push_warning("Custom Teleport", "Please enter a valid name.");
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_NAME"_T.data());
}
else if (g_custom_teleport_service.get_saved_location_by_name(new_location_name))
{
g_notification_service->push_warning("Custom Teleport", std::format("Location with the name {} already exists", new_location_name));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), std::vformat("VIEW_SELF_CUSTOM_TELEPORT_LOCATION_ALREADY_EXISTS"_T, std::make_format_args(new_location_name)));
}
else
{
@ -101,18 +101,18 @@ namespace big
}
});
ImGui::SameLine();
components::button("Save current selected blip", [] {
components::button("VIEW_SELF_CUSTOM_TELEPORT_SAVE_BLIP"_T, [] {
if (new_location_name.empty())
{
g_notification_service->push_warning("Custom Teleport", "Please enter a valid name.");
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_NAME"_T.data());
}
else if (g_custom_teleport_service.get_saved_location_by_name(new_location_name))
{
g_notification_service->push_warning("Custom Teleport", std::format("Location with the name {} already exists", new_location_name));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), std::vformat("VIEW_SELF_CUSTOM_TELEPORT_LOCATION_ALREADY_EXISTS"_T, std::make_format_args(new_location_name)));
}
else if (!*g_pointers->m_gta.m_is_session_started)
{
g_notification_service->push_warning("Custom Teleport", "TELEPORT_NOT_ONLINE"_T.data());
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "TELEPORT_NOT_ONLINE"_T.data());
return;
}
else
@ -121,7 +121,7 @@ namespace big
auto blip = blip::get_selected_blip();
if (blip == nullptr)
{
g_notification_service->push_warning("Custom Teleport", std::format("Cannot find selected blip."));
g_notification_service->push_warning("GUI_TAB_CUSTOM_TELEPORT"_T.data(), "VIEW_SELF_CUSTOM_TELEPORT_INVALID_BLIP"_T.data());
return;
}
teleport_location.name = new_location_name;
@ -137,13 +137,14 @@ namespace big
ImGui::Separator();
components::small_text("Double click to teleport\nShift click to delete");
components::small_text("VIEW_SELF_CUSTOM_TELEPORT_DOUBLE_CLICK_TO_TELEPORT"_T);
components::small_text("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T);
ImGui::Spacing();
components::input_text_with_hint("##filter", "Search", filter);
components::input_text_with_hint("##filter", "SEARCH"_T, filter);
ImGui::BeginGroup();
components::small_text("Categories");
components::small_text("VIEW_SELF_ANIMATIONS_CATEGORIES"_T);
if (ImGui::BeginListBox("##categories", {250, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.5)}))
{
for (auto& l : g_custom_teleport_service.all_saved_locations | std::ranges::views::keys)
@ -158,7 +159,7 @@ namespace big
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::small_text("Locations");
components::small_text("VIEW_SELF_CUSTOM_TELEPORT_LOCATIONS"_T);
if (ImGui::BeginListBox("##telelocations", {250, static_cast<float>(*g_pointers->m_gta.m_resolution_y * 0.5)}))
{
if (g_custom_teleport_service.all_saved_locations.find(category)
@ -194,7 +195,7 @@ namespace big
ImGui::BeginTooltip();
if (l.name.length() > 27)
ImGui::Text(l.name.data());
ImGui::Text("Distance: %f", get_distance_to_telelocation(l));
ImGui::Text(std::format("{}: {}", "VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T, get_distance_to_telelocation(l)).c_str());
ImGui::EndTooltip();
}
}

View File

@ -40,7 +40,7 @@ namespace big
components::command_button<"ballisticarmor">();
ImGui::SeparatorText("Services");
ImGui::SeparatorText("VIEW_SELF_MOBILE_SERVICES"_T.data());
components::command_button<"avenger">();
components::command_button<"kosatka">();
@ -49,7 +49,7 @@ namespace big
components::command_button<"acidlab">();
components::command_button<"acidbike">();
ImGui::SeparatorText("Miscellaneous");
ImGui::SeparatorText("DEBUG_TAB_MISC"_T.data());
components::command_button<"taxi">();

View File

@ -226,18 +226,18 @@ namespace big
}
ImGui::SameLine();
ImGui::BeginGroup();
if (ImGui::Button("Set Persist Outfit"))
if (ImGui::Button("VIEW_SELF_OUTFIT_SET_PERSIST_OUTFIT"_T.data()))
{
g.self.persist_outfit = saved_outfits[selected_index];
}
ImGui::SameLine();
if (ImGui::Button("Clear Persist Outfit"))
if (ImGui::Button("VIEW_SELF_OUTFIT_CLEAR_PERSIST_OUTFIT"_T.data()))
{
g.self.persist_outfit.clear();
}
ImGui::SameLine();
ImGui::Checkbox("Disable During Missions?", &g.self.persist_outfits_mis);
ImGui::Text(std::format("Current Persisted Outfit: {}", g.self.persist_outfit).c_str());
ImGui::Checkbox("VIEW_SELF_OUTFIT_DISABLE_DURING_MISSIONS"_T.data(), &g.self.persist_outfits_mis);
ImGui::Text(std::format("{}: {}", "VIEW_SELF_OUTFIT_CURRENT_PERSISTED_OUTFIT"_T.data(), g.self.persist_outfit).c_str());
ImGui::EndGroup();
}
}

View File

@ -87,7 +87,7 @@ namespace big
ImGui::Checkbox("DANCE_MODE"_T.data(), &g.self.dance_mode);
components::command_checkbox<"orbitaldrone">();
components::options_modal("Orbital drone", [] {
components::options_modal("VIEW_SELF_ORBITAL_DRONE"_T.data(), [] {
ImGui::Separator();
ImGui::BeginGroup();
ImGui::Text("ORBITAL_DRONE_USAGE_DESCR"_T.data());
@ -149,9 +149,9 @@ namespace big
});
components::command_checkbox<"ptfx">();
components::options_modal("PTFX", [] {
ImGui::SliderFloat("PTFX Size", &g.self.ptfx_effects.size, 0.1f, 2.f);
if (ImGui::BeginCombo("Asset", ptfx_named[g.self.ptfx_effects.select].friendly_name))
components::options_modal("VIEW_SELF_PTFX"_T.data(), [] {
ImGui::SliderFloat("VIEW_SELF_PTFX_SIZE"_T.data(), &g.self.ptfx_effects.size, 0.1f, 2.f);
if (ImGui::BeginCombo("VIEW_SELF_ASSET"_T.data(), ptfx_named[g.self.ptfx_effects.select].friendly_name))
{
for (int i = 0; i < IM_ARRAYSIZE(ptfx_named); i++)
{
@ -169,7 +169,7 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Effect", g.self.ptfx_effects.effect))
if (ImGui::BeginCombo("VIEW_SELF_EFFECT"_T.data(), g.self.ptfx_effects.effect))
{
for (const auto& ptfx_type : ptfx_named[g.self.ptfx_effects.select].effect_names)
{
@ -185,7 +185,7 @@ namespace big
});
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
components::options_modal("Police", [] {
components::options_modal("POLICE"_T.data(), [] {
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
components::command_button<"clearwantedlvl">();
if (!g.self.never_wanted)
@ -315,7 +315,7 @@ namespace big
if (g.self.hud.color_override)
{
ImGui::Combo("Color Index", &color_select_index, hud_colors.data(), hud_colors.size());
ImGui::Combo("VIEW_SELF_COLOR_INDEX"_T.data(), &color_select_index, hud_colors.data(), hud_colors.size());
auto& ovr_color = g.self.hud.hud_color_overrides[color_select_index];
@ -325,7 +325,7 @@ namespace big
col[2] = ovr_color.b / 255.0f;
col[3] = ovr_color.a / 255.0f;
if (ImGui::ColorPicker4("Override Color", col))
if (ImGui::ColorPicker4("VIEW_SELF_COLOR_OVERRIDE"_T.data(), col))
{
ovr_color.r = (int)(col[0] * 255);
ovr_color.g = (int)(col[1] * 255);
@ -338,7 +338,7 @@ namespace big
});
}
components::button("Restore Default Color", [] {
components::button("VIEW_SELF_RESTORE_DEFAULT_COLOR"_T, [] {
g.self.hud.hud_color_overrides[color_select_index] = g.self.hud.hud_color_defaults[color_select_index];
auto& col = g.self.hud.hud_color_defaults[color_select_index];
@ -347,7 +347,7 @@ namespace big
ImGui::SameLine();
components::button("Restore All Defaults", [] {
components::button("VIEW_SELF_RESTORE_ALL_DEFAULTS"_T, [] {
for (int i = 0; i < hud_colors.size(); i++)
{
auto& col = g.self.hud.hud_color_defaults[i];

View File

@ -13,18 +13,18 @@ namespace big
ImGui::SeparatorText("BLIPS"_T.data());
ImGui::Spacing();
components::command_button<"waypointtp">({}, "Waypoint");
components::command_button<"waypointtp">({}, "VIEW_PLAYER_TELEPORT_WAYPOINT"_T);
ImGui::SameLine();
components::command_button<"objectivetp">({}, "Objective");
components::command_button<"objectivetp">({}, "VIEW_TELEPORT_OBJECTIVE"_T);
ImGui::SameLine();
components::command_button<"highlighttp">({}, "Selected");
components::command_button<"highlighttp">({}, "VIEW_TELEPORT_SELECTED"_T);
components::command_checkbox<"autotptowp">();
ImGui::SeparatorText("Movement");
ImGui::SeparatorText("VIEW_TELEPORT_MOVEMENT"_T.data());
ImGui::Spacing();
components::small_text("Current coordinates");
components::small_text("VIEW_TELEPORT_CURRENT_COORDINATES"_T);
float coords[3] = {self::pos.x, self::pos.y, self::pos.z};
static float new_location[3];
static float increment = 1;
@ -32,30 +32,30 @@ namespace big
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##currentcoordinates", coords, "%f", ImGuiInputTextFlags_ReadOnly);
ImGui::SameLine();
components::button("Copy to custom", [coords] {
components::button("VIEW_TELEPORT_COPY_TO_CUSTOM"_T, [coords] {
std::copy(std::begin(coords), std::end(coords), std::begin(new_location));
});
components::small_text("Custom teleport");
components::small_text("GUI_TAB_CUSTOM_TELEPORT"_T);
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##Customlocation", new_location);
ImGui::SameLine();
components::button("Teleport", [] {
components::button("GUI_TAB_TELEPORT"_T, [] {
teleport::to_coords({new_location[0], new_location[1], new_location[2]});
});
ImGui::Spacing();
components::small_text("Specific movement");
components::small_text("VIEW_TELEPORT_SPECIFIC_MOVEMENT"_T);
ImGui::Spacing();
ImGui::SetNextItemWidth(200);
ImGui::InputFloat("Distance", &increment);
ImGui::InputFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &increment);
ImGui::BeginGroup();
components::button("Forward", [] {
components::button("VIEW_TELEPORT_FORWARD"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, increment, 0));
});
components::button("Backward", [] {
components::button("VIEW_TELEPORT_BACKWARD"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, -increment, 0));
});
ImGui::EndGroup();
@ -63,10 +63,10 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Left", [] {
components::button("LEFT"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, -increment, 0, 0));
});
components::button("Right", [] {
components::button("RIGHT"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, increment, 0, 0));
});
ImGui::EndGroup();
@ -74,10 +74,10 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::button("Up", [] {
components::button("VIEW_TELEPORT_UP"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, increment));
});
components::button("Down", [] {
components::button("VIEW_TELEPORT_DOWN"_T, [] {
teleport::to_coords(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, -increment));
});
ImGui::EndGroup();
@ -108,7 +108,7 @@ namespace big
}
const auto& selected_ipl = ipls[g.self.ipls.select];
if (components::button("LOAD_IPL"_T.data()))
if (components::button("LOAD_IPL"_T))
{
//unload all previous ipls
for (auto& ipl : ipls)
@ -128,13 +128,13 @@ namespace big
ImGui::SameLine();
if (components::button("TP_TO_IPL"_T.data()))
if (components::button("TP_TO_IPL"_T))
{
teleport::to_coords(selected_ipl.location);
}
ImGui::Spacing();
components::small_text("IPL_INFOS"_T.data());
components::small_text("IPL_INFOS"_T);
ImGui::Text(std::vformat("IPL_CNT"_T, std::make_format_args(selected_ipl.ipl_names.size())).data());
ImGui::Text(std::vformat("IPL_POSITION"_T,

View File

@ -1,5 +1,4 @@
#include "core/data/bullet_impact_types.hpp"
#include "core/data/custom_weapons.hpp"
#include "core/data/special_ammo_types.hpp"
#include "fiber_pool.hpp"
#include "gta/joaat.hpp"
@ -12,6 +11,24 @@
namespace big
{
struct custom_weapon
{
big::CustomWeapon id;
const std::string_view name;
};
const custom_weapon custom_weapons[] = {
{big::CustomWeapon::NONE, "VIEW_SELF_WEAPONS_NONE"_T},
{big::CustomWeapon::CAGE_GUN, "VIEW_SELF_WEAPONS_CAGE_GUN"_T},
{big::CustomWeapon::DELETE_GUN, "VIEW_SELF_WEAPONS_DELETE_GUN"_T},
{big::CustomWeapon::GRAVITY_GUN, "VIEW_SELF_WEAPONS_GRAVITY_GUN"_T},
{big::CustomWeapon::STEAL_VEHICLE_GUN, "BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T},
{big::CustomWeapon::REPAIR_GUN, "BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T},
{big::CustomWeapon::VEHICLE_GUN, "BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T},
{big::CustomWeapon::TP_GUN, "VIEW_SELF_WEAPONS_TP_GUN"_T},
{big::CustomWeapon::PAINT_GUN, "VIEW_SELF_WEAPONS_PAINT_GUN"_T},
};
void view::weapons()
{
ImGui::SeparatorText("AMMO"_T.data());
@ -22,19 +39,19 @@ namespace big
components::command_checkbox<"alwaysfullammo">();
components::command_checkbox<"infclip">();
components::command_checkbox<"infrange">();
ImGui::Checkbox("Allow Weapons In Interiors", &g.weapons.interior_weapon);
ImGui::Checkbox("VIEW_WEAPON_ALLOW_WEAPONS_IN_INTERIORS"_T.data(), &g.weapons.interior_weapon);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Increase C4 Limit (Max = 50)", &g.weapons.increased_c4_limit);
ImGui::Checkbox("Increase Flare Limit (Max = 50)", &g.weapons.increased_flare_limit);
ImGui::Checkbox("VIEW_WEAPON_INCREASE_C4_LIMIT"_T.data(), &g.weapons.increased_c4_limit);
ImGui::Checkbox("VIEW_WEAPON_INCREASE_FLARE_LIMIT"_T.data(), &g.weapons.increased_flare_limit);
components::command_checkbox<"rapidfire">();
ImGui::Checkbox("ENABLE_SPECIAL_AMMO"_T.data(), &g.weapons.ammo_special.toggle);
components::options_modal("Special ammo", [] {
components::options_modal("SPECIAL_AMMO"_T.data(), [] {
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
@ -76,7 +93,7 @@ namespace big
ImGui::EndGroup();
ImGui::SeparatorText("MISC"_T.data());
ImGui::SeparatorText("DEBUG_TAB_MISC"_T.data());
components::command_checkbox<"norecoil">();
ImGui::SameLine();
@ -102,18 +119,18 @@ namespace big
});
components::command_checkbox<"incrdamage">();
ImGui::InputFloat("Damage", &g.weapons.increased_damage, .1, 10, "%.1f");
ImGui::InputFloat("VIEW_WEAPON_DAMAGE"_T.data(), &g.weapons.increased_damage, .1, 10, "%.1f");
ImGui::SeparatorText("CUSTOM_WEAPONS"_T.data());
ImGui::Checkbox("Custom Gun only fires when weapon is out", &g.self.custom_weapon_stop);
ImGui::Checkbox("VIEW_WEAPON_CUSTOM_GUN_ONLY_FIRES_WHEN_THE_WEAPON_IS_OUT"_T.data(), &g.self.custom_weapon_stop);
CustomWeapon selected = g.weapons.custom_weapon;
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name))
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name.data()))
{
for (const custom_weapon& weapon : custom_weapons)
{
if (ImGui::Selectable(weapon.name, weapon.id == selected))
if (ImGui::Selectable(weapon.name.data(), weapon.id == selected))
{
g.weapons.custom_weapon = weapon.id;
}
@ -130,7 +147,7 @@ namespace big
switch (selected)
{
case CustomWeapon::GRAVITY_GUN:
ImGui::Checkbox("Launch on release", &g.weapons.gravity_gun.launch_on_release);
ImGui::Checkbox("VIEW_WEAPON_LAUNCH_ON_RELEASE"_T.data(), &g.weapons.gravity_gun.launch_on_release);
break;
case CustomWeapon::VEHICLE_GUN:
// this some ugly ass looking code
@ -145,12 +162,12 @@ namespace big
break;
case CustomWeapon::PAINT_GUN:
ImGui::Checkbox("Rainbow Color", &g.weapons.paintgun.rainbow);
ImGui::SliderFloat("Rainbow Speed", &g.weapons.paintgun.speed, 0.f, 10.f);
if (!g.weapons.paintgun.rainbow) { ImGui::ColorEdit4("Paint Gun Color", g.weapons.paintgun.col); }
ImGui::Checkbox("RAINBOW_PAINT"_T.data(), &g.weapons.paintgun.rainbow);
ImGui::SliderFloat("VIEW_WEAPON_RAINBOW_SPEED"_T.data(), &g.weapons.paintgun.speed, 0.f, 10.f);
if (!g.weapons.paintgun.rainbow) { ImGui::ColorEdit4("VIEW_WEAPON_PAINT_GUN_COLOR"_T.data(), g.weapons.paintgun.col); }
}
ImGui::SeparatorText("Aim Assistance");
ImGui::SeparatorText("VIEW_WEAPON_AIM_ASSISTANCE"_T.data());
components::command_checkbox<"triggerbot">();
ImGui::SameLine();
components::command_checkbox<"aimbot">();
@ -170,21 +187,21 @@ namespace big
{
ImGui::SameLine();
ImGui::PushItemWidth(220);
ImGui::SliderFloat("Speed", &g.weapons.aimbot.smoothing_speed, 1.f, 12.f, "%.1f");
ImGui::SliderFloat("VIEW_WEAPON_AIM_SPEED"_T.data(), &g.weapons.aimbot.smoothing_speed, 1.f, 12.f, "%.1f");
ImGui::PopItemWidth();
}
ImGui::PushItemWidth(350);
ImGui::SliderFloat("FOV", &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
ImGui::SliderFloat("Distance", &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
ImGui::SliderFloat("VIEW_WEAPON_AIM_FOV"_T.data(), &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
ImGui::SliderFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
ImGui::PopItemWidth();
}
if (ImGui::CollapsingHeader("Ammunation"))
if (ImGui::CollapsingHeader("Ammunation"_T.data()))
{
static Hash selected_weapon_hash, selected_weapon_attachment_hash{};
static std::string selected_weapon, selected_weapon_attachment;
ImGui::PushItemWidth(300);
if (ImGui::BeginCombo("Weapons", selected_weapon.c_str()))
if (ImGui::BeginCombo("GUI_TAB_WEAPONS"_T.data(), selected_weapon.c_str()))
{
for (auto& weapon : g_gta_data_service->weapons())
{
@ -205,16 +222,16 @@ namespace big
}
ImGui::PopItemWidth();
ImGui::SameLine();
components::button("Give Weapon", [] {
components::button("VIEW_WEAPON_GIVE_WEAPON"_T, [] {
WEAPON::GIVE_WEAPON_TO_PED(self::ped, selected_weapon_hash, 9999, false, true);
});
ImGui::SameLine();
components::button("Remove Weapon", [] {
components::button("VIEW_WEAPON_REMOVE_WEAPON"_T, [] {
WEAPON::REMOVE_WEAPON_FROM_PED(self::ped, selected_weapon_hash);
});
ImGui::PushItemWidth(250);
if (ImGui::BeginCombo("Attachments", selected_weapon_attachment.c_str()))
if (ImGui::BeginCombo("VIEW_WEAPON_ATTACHMENTS"_T.data(), selected_weapon_attachment.c_str()))
{
weapon_item weapon = g_gta_data_service->weapon_by_hash(selected_weapon_hash);
if (!weapon.m_attachments.empty())
@ -246,11 +263,11 @@ namespace big
ImGui::EndCombo();
}
ImGui::SameLine();
components::button("Add to Weapon", [] {
components::button("VIEW_WEAPON_ADD_TO_WEAPON"_T, [] {
WEAPON::GIVE_WEAPON_COMPONENT_TO_PED(self::ped, selected_weapon_hash, selected_weapon_attachment_hash);
});
ImGui::SameLine();
components::button("Remove from Weapon", [] {
components::button("VIEW_WEAPON_REMOVE_TO_WEAPON"_T, [] {
WEAPON::REMOVE_WEAPON_COMPONENT_FROM_PED(self::ped, selected_weapon_hash, selected_weapon_attachment_hash);
});
ImGui::PopItemWidth();
@ -261,24 +278,26 @@ namespace big
if (selected_weapon.ends_with("Mk II"))
{
ImGui::Combo("Tints", &tint, mk2_tints, IM_ARRAYSIZE(mk2_tints));
ImGui::Combo("VIEW_WEAPON_TINTS"_T.data(), &tint, mk2_tints, IM_ARRAYSIZE(mk2_tints));
}
else
{
ImGui::Combo("Tints", &tint, default_tints, IM_ARRAYSIZE(default_tints));
ImGui::Combo("VIEW_WEAPON_TINTS"_T.data(), &tint, default_tints, IM_ARRAYSIZE(default_tints));
}
ImGui::SameLine();
components::button("Apply", [] {
components::button("APPLY"_T, [] {
WEAPON::SET_PED_WEAPON_TINT_INDEX(self::ped, selected_weapon_hash, tint);
});
}
if (ImGui::CollapsingHeader("Persist Weapons"))
if (ImGui::CollapsingHeader("VIEW_WEAPON_PERSIST_WEAPONS"_T.data()))
{
ImGui::Checkbox("Enabled##persist_weapons", &g.persist_weapons.enabled);
ImGui::PushID(1);
ImGui::Checkbox("ENABLED"_T.data(), &g.persist_weapons.enabled);
ImGui::PopID();
static std::string selected_loadout = g.persist_weapons.weapon_loadout_file;
ImGui::PushItemWidth(250);
if (ImGui::BeginListBox("Saved Loadouts", ImVec2(200, 200)))
if (ImGui::BeginListBox("VIEW_WEAPON_PERSIST_WEAPONS_SAVED_LOADOUTS"_T.data(), ImVec2(200, 200)))
{
for (std::string filename : persist_weapons::list_weapon_loadouts())
{
@ -292,36 +311,38 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
static std::string input_file_name;
components::input_text_with_hint("Weapon Loadout Filename", "Loadout Name", input_file_name);
components::button("Save Loadout", [] {
components::input_text_with_hint("VIEW_WEAPON_PERSIST_WEAPONS_WEAPON_LOADOUT_FILENAME"_T, "VIEW_WEAPON_PERSIST_WEAPONS_LOADOUT_NAME"_T, input_file_name);
components::button("VIEW_WEAPON_PERSIST_WEAPONS_SAVE"_T, [] {
persist_weapons::save_weapons(input_file_name);
input_file_name.clear();
});
ImGui::SameLine();
components::button("Load Loadout", [] {
components::button("VIEW_WEAPON_PERSIST_WEAPONS_LOAD"_T, [] {
persist_weapons::give_player_loadout(selected_loadout);
});
ImGui::SameLine();
components::button("Set Loadout", [] {
components::button("VIEW_WEAPON_PERSIST_WEAPONS_SET_LOADOUT"_T, [] {
persist_weapons::set_weapon_loadout(selected_loadout);
});
ImGui::Text(std::format("Current Loadout: {}:", g.persist_weapons.weapon_loadout_file).data());
ImGui::Text(std::format("{}: {}:", "VIEW_WEAPON_PERSIST_WEAPONS_CURRENT_LOADOUT"_T, g.persist_weapons.weapon_loadout_file).data());
ImGui::EndGroup();
ImGui::PopItemWidth();
}
if (ImGui::CollapsingHeader("Weapon Hotkeys"))
if (ImGui::CollapsingHeader("VIEW_WEAPON_WEAPON_HOTKEYS"_T.data()))
{
ImGui::Checkbox("Enabled##weapon_hotkeys", &g.weapons.enable_weapon_hotkeys);
ImGui::PushID(2);
ImGui::Checkbox("ENABLED"_T.data(), &g.weapons.enable_weapon_hotkeys);
ImGui::PopID();
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("This will select the next weapon in the hotkey list.\r\nThe first weapon in the list is the first weapon it will select, then the second is the one it will select after and so on.\r\nAfter the end of the list, it will wrap back to the first weapon.");
ImGui::SetTooltip("VIEW_WEAPON_WEAPON_HOTKEYS_TOOLTIP"_T.data());
}
static int selected_key = 0;
const char* const keys[]{"1", "2", "3", "4", "5", "6"};
ImGui::PushItemWidth(250);
ImGui::Combo("Key", &selected_key, keys, IM_ARRAYSIZE(keys));
ImGui::Combo("VIEW_WEAPON_WEAPON_HOTKEYS_KEY"_T.data(), &selected_key, keys, IM_ARRAYSIZE(keys));
ImGui::PopItemWidth();
if (!g.weapons.weapon_hotkeys[selected_key].empty())
@ -332,7 +353,7 @@ namespace big
ImGui::PushID(counter);
weapon_item weapon = g_gta_data_service->weapon_by_hash(weapon_hash);
ImGui::PushItemWidth(300);
if (ImGui::BeginCombo("Weapons", weapon.m_display_name.c_str()))
if (ImGui::BeginCombo("GUI_TAB_WEAPONS"_T.data(), weapon.m_display_name.c_str()))
{
for (auto& weapon : g_gta_data_service->weapons())
{
@ -353,7 +374,7 @@ namespace big
ImGui::EndCombo();
}
ImGui::SameLine();
components::button("Set To Current Weapon", [&weapon_hash] {
components::button("VIEW_WEAPON_WEAPON_HOTKEYS_SET_TO_CURRENT_WEAPON"_T, [&weapon_hash] {
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weapon_hash, NULL);
if (weapon_hash == NULL)
{
@ -361,7 +382,7 @@ namespace big
}
});
ImGui::SameLine();
if (ImGui::Button("Remove Weapon"))
if (ImGui::Button("VIEW_WEAPON_REMOVE_WEAPON"_T.data()))
{
g.weapons.weapon_hotkeys[selected_key].erase(g.weapons.weapon_hotkeys[selected_key].begin() + counter);
}
@ -371,7 +392,7 @@ namespace big
}
}
if (ImGui::Button("Add Weapon"))
if (ImGui::Button("VIEW_WEAPON_WEAPON_ADD_WEAPON"_T.data()))
{
g.weapons.weapon_hotkeys[selected_key].push_back(WEAPON_UNARMED);
}

View File

@ -14,10 +14,9 @@ namespace big
auto wep_count = g_gta_data_service->weapons().size();
auto wep_comp_count = g_gta_data_service->weapon_components().size();
components::sub_title("GTA cache stats:");
ImGui::Text("Peds Cached: %d\nVehicles Cached: %d\nWeapons Cached: %d\nWeapon Components Cached: %d", ped_count, veh_count, wep_count, wep_comp_count);
ImGui::Text(std::format("{}: {}\n{}: {}\n{}: {}\n{}: {}", "VIEW_GTA_CACHE_PEDS_CACHED"_T, ped_count, "VIEW_GTA_CACHE_VEHICLES_CACHED"_T, veh_count, "VIEW_GTA_CACHE_WEAPONS_CACHED"_T, wep_count, "VIEW_GTA_CACHE_WEAPON_COMPONENTS_CACHED"_T, wep_comp_count).c_str());
if (components::button("Rebuild Cache"))
if (components::button("VIEW_GTA_CACHE_REBUILD_CACHE"_T))
{
g_gta_data_service->set_state(eGtaDataUpdateState::NEEDS_UPDATE);
g_gta_data_service->update_now();

View File

@ -18,67 +18,67 @@ namespace big
}
static ImVec4 col_text = ImGui::ColorConvertU32ToFloat4(g.window.text_color);
if (ImGui::ColorEdit4("Text Color", (float*)&col_text, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_TEXT_COLOR"_T.data(), (float*)&col_text, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
{
g.window.text_color = ImGui::ColorConvertFloat4ToU32(col_text);
}
static ImVec4 col_button = ImGui::ColorConvertU32ToFloat4(g.window.button_color);
if (ImGui::ColorEdit4("Button Color", (float*)&col_button, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_BUTTON_COLOR"_T.data(), (float*)&col_button, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
{
g.window.button_color = ImGui::ColorConvertFloat4ToU32(col_button);
}
static ImVec4 col_frame = ImGui::ColorConvertU32ToFloat4(g.window.frame_color);
if (ImGui::ColorEdit4("Frame Color", (float*)&col_frame, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
if (ImGui::ColorEdit4("VIEW_GUI_SETTINGS_FRAME_COLOR"_T.data(), (float*)&col_frame, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
{
g.window.frame_color = ImGui::ColorConvertFloat4ToU32(col_frame);
}
components::sub_title("In-Game Overlay");
ImGui::Checkbox("Show Overlay", &g.window.ingame_overlay.opened);
components::sub_title("VIEW_GUI_SETTINGS_INGAME_OVERLAY"_T);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_OVERLAY"_T.data(), &g.window.ingame_overlay.opened);
ImGui::SameLine();
ImGui::Checkbox("Show When Menu Opened", &g.window.ingame_overlay.show_with_menu_opened);
ImGui::Checkbox("VIEW_GUI_SETTINGS_OVERLAY_SHOW_WHEN_MENU_OPENED"_T.data(), &g.window.ingame_overlay.show_with_menu_opened);
ImGui::BeginGroup();
ImGui::Checkbox("Show FPS", &g.window.ingame_overlay.show_fps);
ImGui::Checkbox("Show Players", &g.window.ingame_overlay.show_players);
ImGui::Checkbox("Show Time", &g.window.ingame_overlay.show_time);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_FPS"_T.data(), &g.window.ingame_overlay.show_fps);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_PLAYERS"_T.data(), &g.window.ingame_overlay.show_players);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_TIME"_T.data(), &g.window.ingame_overlay.show_time);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Show time is currently disabled as it caused problems for some users.");
ImGui::Checkbox("Show Indicators", &g.window.ingame_overlay.show_indicators);
ImGui::SetTooltip("VIEW_GUI_SETTINGS_SHOW_TIME_TOOLTIP"_T.data());
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INDICATORS"_T.data(), &g.window.ingame_overlay.show_indicators);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Show Replay Interface", &g.window.ingame_overlay.show_replay_interface);
ImGui::Checkbox("Show Position", &g.window.ingame_overlay.show_position);
ImGui::Checkbox("Show Game Version", &g.window.ingame_overlay.show_game_versions);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_REPLAY_INTERFACE"_T.data(), &g.window.ingame_overlay.show_replay_interface);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_POSITION"_T.data(), &g.window.ingame_overlay.show_position);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_GAME_VERSION"_T.data(), &g.window.ingame_overlay.show_game_versions);
ImGui::EndGroup();
if (g.window.ingame_overlay.show_indicators)
{
if (ImGui::TreeNode("Overlay Indicators"))
if (ImGui::TreeNode("VIEW_GUI_SETTINGS_OVERLAY_INDICATORS"_T.data()))
{
ImGui::BeginGroup();
ImGui::Checkbox("Show Player Godmode", &g.window.ingame_overlay_indicators.show_player_godmode);
ImGui::Checkbox("Show Off Radar", &g.window.ingame_overlay_indicators.show_off_radar);
ImGui::Checkbox("Show Vehicle Godmode", &g.window.ingame_overlay_indicators.show_vehicle_godmode);
ImGui::Checkbox("Show Never Wanted", &g.window.ingame_overlay_indicators.show_never_wanted);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_PLAYER_GODMODE"_T.data(), &g.window.ingame_overlay_indicators.show_player_godmode);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_OFF_THE_RADAR"_T.data(), &g.window.ingame_overlay_indicators.show_off_radar);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_VEHICLE_GODMODE"_T.data(), &g.window.ingame_overlay_indicators.show_vehicle_godmode);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_NEVER_WANTED"_T.data(), &g.window.ingame_overlay_indicators.show_never_wanted);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Show Infinite Ammo", &g.window.ingame_overlay_indicators.show_infinite_ammo);
ImGui::Checkbox("Show Always Full Ammo", &g.window.ingame_overlay_indicators.show_always_full_ammo);
ImGui::Checkbox("Show Infinite Magazine", &g.window.ingame_overlay_indicators.show_infinite_mag);
ImGui::Checkbox("Show Aimbot", &g.window.ingame_overlay_indicators.show_aimbot);
ImGui::Checkbox("Show Triggerbot", &g.window.ingame_overlay_indicators.show_triggerbot);
ImGui::Checkbox("Show Invisibility", &g.window.ingame_overlay_indicators.show_invisibility);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INFINITE_AMMO"_T.data(), &g.window.ingame_overlay_indicators.show_infinite_ammo);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_ALWAYS_FULL_AMMO"_T.data(), &g.window.ingame_overlay_indicators.show_always_full_ammo);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INFINITE_MAGAZINE"_T.data(), &g.window.ingame_overlay_indicators.show_infinite_mag);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_AIMBOT"_T.data(), &g.window.ingame_overlay_indicators.show_aimbot);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_TRIGGERBOT"_T.data(), &g.window.ingame_overlay_indicators.show_triggerbot);
ImGui::Checkbox("VIEW_GUI_SETTINGS_SHOW_INVISIBILITY"_T.data(), &g.window.ingame_overlay_indicators.show_invisibility);
ImGui::EndGroup();
ImGui::TreePop();

View File

@ -8,57 +8,57 @@ namespace big
{
ImGui::PushItemWidth(350.f);
if (ImGui::Hotkey("Menu Toggle", &g.settings.hotkeys.menu_toggle))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_MENU_TOGGLE"_T.data(), &g.settings.hotkeys.menu_toggle))
g.settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
if (ImGui::Hotkey("Teleport to Waypoint", &g.settings.hotkeys.teleport_waypoint))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_WAYPOINT"_T.data(), &g.settings.hotkeys.teleport_waypoint))
g_hotkey_service->update_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint);
if (ImGui::Hotkey("Teleport to Objective", &g.settings.hotkeys.teleport_objective))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_OBJECTIVE"_T.data(), &g.settings.hotkeys.teleport_objective))
g_hotkey_service->update_hotkey("objective", g.settings.hotkeys.teleport_objective);
if (ImGui::Hotkey("Teleport to Selected", &g.settings.hotkeys.teleport_selected))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TELEPORT_TO_SELECTED"_T.data(), &g.settings.hotkeys.teleport_selected))
g_hotkey_service->update_hotkey("highlighttp", g.settings.hotkeys.teleport_selected);
if (ImGui::Hotkey("Teleport into PV", &g.settings.hotkeys.teleport_pv))
if (ImGui::Hotkey("TP_IN_PV"_T.data(), &g.settings.hotkeys.teleport_pv))
g_hotkey_service->update_hotkey("pvtp", g.settings.hotkeys.teleport_pv);
if (ImGui::Hotkey("Toggle Noclip", &g.settings.hotkeys.noclip))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_NOCLIP"_T.data(), &g.settings.hotkeys.noclip))
g_hotkey_service->update_hotkey("noclip", g.settings.hotkeys.noclip);
if (ImGui::Hotkey("Bring PV", &g.settings.hotkeys.bringvehicle))
if (ImGui::Hotkey("BRING_PV"_T.data(), &g.settings.hotkeys.bringvehicle))
g_hotkey_service->update_hotkey("bringpv", g.settings.hotkeys.bringvehicle);
if (ImGui::Hotkey("Toggle invisibility", &g.settings.hotkeys.invis))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.invis))
g_hotkey_service->update_hotkey("invis", g.settings.hotkeys.invis);
if (ImGui::Hotkey("Toggle passive mode", &g.settings.hotkeys.passive))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_PASSIVE_MODE"_T.data(), &g.settings.hotkeys.passive))
g_hotkey_service->update_hotkey("passive", g.settings.hotkeys.passive);
if (ImGui::Hotkey("Heal", &g.settings.hotkeys.heal))
if (ImGui::Hotkey("HEAL"_T.data(), &g.settings.hotkeys.heal))
g_hotkey_service->update_hotkey("heal", g.settings.hotkeys.heal);
if (ImGui::Hotkey("Fill Snacks", &g.settings.hotkeys.fill_inventory))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_FILL_SNACKS"_T.data(), &g.settings.hotkeys.fill_inventory))
g_hotkey_service->update_hotkey("fillsnacks", g.settings.hotkeys.fill_inventory);
if (ImGui::Hotkey("Skip Cutscene", &g.settings.hotkeys.skip_cutscene))
if (ImGui::Hotkey("SKIP_CUTSCENE"_T.data(), &g.settings.hotkeys.skip_cutscene))
g_hotkey_service->update_hotkey("skipcutscene", g.settings.hotkeys.skip_cutscene);
if (ImGui::Hotkey("Toggle Freecam", &g.settings.hotkeys.freecam))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_FREECAM"_T.data(), &g.settings.hotkeys.freecam))
g_hotkey_service->update_hotkey("freecam", g.settings.hotkeys.freecam);
if (ImGui::Hotkey("Toggle Fastrun", &g.settings.hotkeys.superrun))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_FASTRUN"_T.data(), &g.settings.hotkeys.superrun))
g_hotkey_service->update_hotkey("fastrun", g.settings.hotkeys.superrun);
if (ImGui::Hotkey("Toggle Superjump", &g.settings.hotkeys.superjump))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_SUPERJUMP"_T.data(), &g.settings.hotkeys.superjump))
g_hotkey_service->update_hotkey("superjump", g.settings.hotkeys.superjump);
if (ImGui::Hotkey("Toggle Beastjump", &g.settings.hotkeys.beastjump))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_BEASTJUMP"_T.data(), &g.settings.hotkeys.beastjump))
g_hotkey_service->update_hotkey("beastjump", g.settings.hotkeys.beastjump);
if (ImGui::Hotkey("Toggle Vehicle Invisibility", &g.settings.hotkeys.invisveh))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_VEHICLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.invisveh))
g_hotkey_service->update_hotkey("invisveh", g.settings.hotkeys.invisveh);
if (ImGui::Hotkey("Toggle Local Veh Invisibility", &g.settings.hotkeys.localinvisveh))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_LOCAL_VEHICLE_INVISIBILITY"_T.data(), &g.settings.hotkeys.localinvisveh))
g_hotkey_service->update_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh);
if (ImGui::Hotkey("Fill Ammo", &g.settings.hotkeys.fill_ammo));
if (ImGui::Hotkey("FILL_AMMO"_T.data(), &g.settings.hotkeys.fill_ammo));
g_hotkey_service->update_hotkey("fillammo", g.settings.hotkeys.fill_ammo);
if (ImGui::Hotkey("Rage Quit (Like Alt + F4)", &g.settings.hotkeys.fast_quit))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_RAGE_QUIT"_T.data(), &g.settings.hotkeys.fast_quit))
g_hotkey_service->update_hotkey("fastquit", g.settings.hotkeys.fast_quit);
if (ImGui::Hotkey("Toggle Command Executor", &g.settings.hotkeys.cmd_excecutor))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_COMMAND_EXECUTOR"_T.data(), &g.settings.hotkeys.cmd_excecutor))
g_hotkey_service->update_hotkey("cmdexecutor", g.settings.hotkeys.cmd_excecutor);
if (ImGui::Hotkey("Repair PV", &g.settings.hotkeys.repairpv))
if (ImGui::Hotkey("REPAIR_PV"_T.data(), &g.settings.hotkeys.repairpv))
g_hotkey_service->update_hotkey("repairpv", g.settings.hotkeys.repairpv);
if (ImGui::Hotkey("Vehicle controller", &g.settings.hotkeys.open_vehicle_controller))
if (ImGui::Hotkey("VEHICLE_CONTROLLER"_T.data(), &g.settings.hotkeys.open_vehicle_controller))
g_hotkey_service->update_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller);
if (ImGui::Hotkey("Toggle Vehicle Fly", &g.settings.hotkeys.vehicle_flymode))
if (ImGui::Hotkey("VIEW_HOTKEY_SETTINGS_TOGGLE_VEHICLE_FLY"_T.data(), &g.settings.hotkeys.vehicle_flymode))
g_hotkey_service->update_hotkey("vehiclefly", g.settings.hotkeys.vehicle_flymode);
if (ImGui::Hotkey("Clear Wanted", &g.settings.hotkeys.clear_wanted))
if (ImGui::Hotkey("CLEAR_WANTED_LEVEL"_T.data(), &g.settings.hotkeys.clear_wanted))
g_hotkey_service->update_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted);
ImGui::PopItemWidth();

View File

@ -12,7 +12,7 @@ namespace big
void view::lua_scripts()
{
ImGui::PushItemWidth(250);
components::sub_title("Loaded Lua Scipts");
components::sub_title("VIEW_LUA_SCRIPTS_LOADED_LUA_SCRIPTS"_T);
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
{
@ -31,11 +31,11 @@ namespace big
if (!selected_module.expired())
{
ImGui::Text("Scripts Registered: %d", selected_module.lock()->m_registered_scripts.size());
ImGui::Text("Memory Patches Registered: %d", selected_module.lock()->m_registered_patches.size());
ImGui::Text("GUI Tabs Registered: %d", selected_module.lock()->m_gui.size());
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_SCRIPTS_REGISTERED"_T, selected_module.lock()->m_registered_scripts.size()).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_MEMORY_PATCHES_REGISTERED"_T, selected_module.lock()->m_registered_patches.size()).c_str());
ImGui::Text(std::format("{}: {}", "VIEW_LUA_SCRIPTS_GUI_TABS_REGISTERED"_T, selected_module.lock()->m_gui.size()).c_str());
if (components::button("Reload"))
if (components::button("VIEW_LUA_SCRIPTS_RELOAD"_T))
{
const std::filesystem::path module_path = selected_module.lock()->module_path();
const auto id = selected_module.lock()->module_id();
@ -48,15 +48,15 @@ namespace big
ImGui::EndGroup();
if (components::button("Reload All"))
if (components::button("VIEW_LUA_SCRIPTS_RELOAD_ALL"_T))
{
g_lua_manager->unload_all_modules();
g_lua_manager->load_all_modules();
}
ImGui::SameLine();
ImGui::Checkbox("Auto Reload Changed Scripts", &g.lua.enable_auto_reload_changed_scripts);
ImGui::Checkbox("VIEW_LUA_SCRIPTS_AUTO_RELOAD_CHANGED_SCRIPTS"_T.data(), &g.lua.enable_auto_reload_changed_scripts);
if (components::button("Open Lua Scripts Folder"))
if (components::button("VIEW_LUA_SCRIPTS_OPEN_LUA_SCRIPTS_FOLDER"_T))
{
std::string command = "explorer.exe /select," + g_lua_manager->get_scripts_folder().get_path().string();

View File

@ -53,21 +53,21 @@ namespace big
ImGui::SetTooltip("BLOCK_RID_JOINING_DESCRIPTION"_T.data());
ImGui::Checkbox("RECEIVE_PICKUP"_T.data(), &g.protections.receive_pickup);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This prevents the collection of pickups such as unwanted money bags\nNote: Normal pickups are also no longer possible to collect with this enabled");
ImGui::SetTooltip("VIEW_PROTECTION_SETTINGS_RECEIVE_PICKUP_TOOLTIP"_T.data());
ImGui::Checkbox("ADMIN_CHECK"_T.data(), &g.protections.admin_check);
ImGui::Checkbox("Kick Rejoin", &g.protections.kick_rejoin);
ImGui::Checkbox("VIEW_PROTECTION_SETTINGS_KICK_REJOIN"_T.data(), &g.protections.kick_rejoin);
components::command_checkbox<"forcerelays">();
ImGui::EndGroup();
ImGui::SeparatorText("Options");
ImGui::SeparatorText("VIEW_PROTECTION_SETTINGS_OPTIONS"_T.data());
ImGui::BeginGroup();
if (ImGui::Button("Enable All Protections"))
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_ENABLE_ALL_PROTECTIONS"_T.data()))
set_all_protections(true);
ImGui::SameLine();
if (ImGui::Button("Disable All Protections"))
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_DISABLE_ALL_PROTECTIONS"_T.data()))
set_all_protections(false);
ImGui::SameLine();
if (ImGui::Button("Reset Protections"))
if (ImGui::Button("VIEW_PROTECTION_SETTINGS_RESET_PROTECTIONS"_T.data()))
reset_protections();
ImGui::EndGroup();
};

View File

@ -12,7 +12,7 @@ namespace big
ImGui::SeparatorText("SETTINGS_LANGUAGES"_T.data());
if (language_entries.contains(current_pack) && ImGui::BeginCombo("Menu Language", language_entries.at(current_pack).name.c_str()))
if (language_entries.contains(current_pack) && ImGui::BeginCombo("VIEW_SETTINGS_MENU_LANGUAGE"_T.data(), language_entries.at(current_pack).name.c_str()))
{
for (auto& i : language_entries)
{
@ -27,7 +27,7 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Game Language", languages[*g_pointers->m_gta.m_language].name))
if (ImGui::BeginCombo("VIEW_SETTINGS_GAME_LANGUAGE"_T.data(), languages[*g_pointers->m_gta.m_language].name))
{
for (auto& language : languages)
{
@ -49,19 +49,19 @@ namespace big
ImGui::EndCombo();
}
if (components::button("Force Update Languages"))
if (components::button("VIEW_SETTINGS_FORCE_UPDATE_LANGUAGES"_T))
{
g_thread_pool->push([] {
g_translation_service.update_n_reload_language_packs();
g_notification_service->push_success("Translations", "Finished updating translations.");
g_notification_service->push_success("LANGUAGE"_T.data(), "VIEW_SETTINGS_FINISHED_UPDATING_TRANSLATIONS"_T.data());
});
}
ImGui::SeparatorText("SETTINGS_MISC"_T.data());
ImGui::Checkbox("SETTINGS_MISC_DEV_DLC"_T.data(), &g.settings.dev_dlc);
if (ImGui::Button("Reset Settings"))
if (ImGui::Button("VIEW_SETTINGS_RESET"_T.data()))
{
g.write_default_config();
g.load();

View File

@ -107,9 +107,9 @@ namespace big
static void tab_item_stat()
{
if (ImGui::BeginTabItem("Stat"))
if (ImGui::BeginTabItem("VIEW_STAT_EDITOR_STAT"_T.data()))
{
ImGui::Text("Stat: prefix with $ for string ($MPX_CHAR_SET_RP_GIFT_ADMIN)");
ImGui::Text("VIEW_STAT_EDITOR_STAT_HELP"_T.data());
enum Mode
{
@ -146,111 +146,112 @@ namespace big
{
case INT:
{
components::input_text("Stat", stat_int_text, sizeof(stat_int_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_int_text, sizeof(stat_int_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.int_text = stat_int_text;
});
components::input_text("Value", stat_int_value, sizeof(stat_int_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_int_value, sizeof(stat_int_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.int_value = stat_int_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_int(stat_int_text, stat_int_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.int_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.int_read);
components::input_text("##read_result", stat_int_read_result, sizeof(stat_int_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case BOOLEAN:
{
components::input_text("Stat", stat_bool_text, sizeof(stat_bool_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_bool_text, sizeof(stat_bool_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.bool_text = stat_bool_text;
});
components::input_text("Value", stat_bool_value, sizeof(stat_bool_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_bool_value, sizeof(stat_bool_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.bool_value = stat_bool_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_bool(stat_bool_text, stat_bool_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.bool_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.bool_read);
components::input_text("##read_result", stat_bool_read_result, sizeof(stat_bool_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case FLOAT:
{
components::input_text("Stat", stat_float_text, sizeof(stat_float_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_float_text, sizeof(stat_float_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.float_text = stat_float_text;
});
components::input_text("Value", stat_float_value, sizeof(stat_float_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_float_value, sizeof(stat_float_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.float_value = stat_float_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_float(stat_float_text, stat_float_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.float_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.float_read);
components::input_text("##read_result", stat_float_read_result, sizeof(stat_float_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case INCREMENT:
{
components::input_text("Stat", stat_increment_text, sizeof(stat_increment_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_increment_text, sizeof(stat_increment_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.increment_text = stat_increment_text;
});
components::input_text("Value", stat_increment_value, sizeof(stat_increment_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_increment_value, sizeof(stat_increment_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.increment_value = stat_increment_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_increment(stat_increment_text, stat_increment_value);
});
ImGui::SameLine();
ImGui::SameLine();
ImGui::Checkbox("Loop Write", &g.stat_editor.stat.increment_loop_write);
ImGui::Checkbox("VIEW_STAT_EDITOR_LOOP_WRITE"_T.data(), &g.stat_editor.stat.increment_loop_write);
}
break;
case DATE:
{
components::input_text("Stat", stat_date_text, sizeof(stat_date_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_date_text, sizeof(stat_date_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.date_text = stat_date_text;
});
components::input_text("Value", stat_date_value, sizeof(stat_date_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_date_value, sizeof(stat_date_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.date_value = stat_date_value;
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("year month day hour minute second millisecond\nexample: 2022 1 17 21 34 55");
components::button("Apply", [] {
ImGui::SetTooltip("VIEW_STAT_EDITOR_DATE_TOOLTIP"_T.data());
components::button("APPLY"_T, [] {
helper::stat_set_date(stat_date_text, stat_date_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.date_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.date_read);
components::input_text("##read_result", stat_date_read_result, sizeof(stat_date_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case STRING:
{
components::input_text("Stat", stat_string_text, sizeof(stat_string_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_string_text, sizeof(stat_string_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.string_text = stat_string_text;
});
components::input_text("Value", stat_string_value, sizeof(stat_string_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_string_value, sizeof(stat_string_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.string_value = stat_string_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_string(stat_string_text, stat_string_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.string_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.string_read);
components::input_text("##read_result", stat_string_read_result, sizeof(stat_string_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case LABEL:
{
components::input_text("Stat", stat_label_text, sizeof(stat_label_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_label_text, sizeof(stat_label_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.label_text = stat_label_text;
});
components::input_text("Value", stat_label_value, sizeof(stat_label_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_label_value, sizeof(stat_label_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.label_value = stat_label_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_label(stat_label_text, stat_label_value);
});
ImGui::SameLine();
@ -258,17 +259,17 @@ namespace big
break;
case USER_ID:
{
components::input_text("Stat", stat_user_id_text, sizeof(stat_user_id_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_STAT"_T, stat_user_id_text, sizeof(stat_user_id_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.user_id_text = stat_user_id_text;
});
components::input_text("Value", stat_user_id_value, sizeof(stat_user_id_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, stat_user_id_value, sizeof(stat_user_id_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.stat.user_id_value = stat_user_id_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::stat_set_user_id(stat_user_id_text, stat_user_id_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.stat.user_id_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.stat.user_id_read);
components::input_text("##read_result", stat_user_id_read_result, sizeof(stat_user_id_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
@ -276,7 +277,7 @@ namespace big
{
ImGui::Text("0:Int\n1:Bool\n2:Float\n3:Increment\n4:Date\n5:String\n6:Label\n7:User Id");
ImGui::Text("Example:\n$MPX_CHAR_NAME\n5:name\n$MPX_DEFAULT_STATS_SET\n1:0");
components::button("Import From Clipboard", [] {
components::button("IMPORT_FROM_CLIPBOARD"_T, [] {
std::string clipboard_text = ImGui::GetClipboardText();
std::vector<std::string> lines;
std::string line;
@ -320,9 +321,9 @@ namespace big
static void tab_item_packed_stat()
{
if (ImGui::BeginTabItem("Packed Stat"))
if (ImGui::BeginTabItem("VIEW_STAT_EDITOR_PACKED_STAT"_T.data()))
{
ImGui::Text("Index: enter two numbers to represent a range (31786 32786)");
ImGui::Text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX_HELP"_T.data());
enum Mode
{
@ -341,33 +342,33 @@ namespace big
{
case INT:
{
components::input_text("Index", packed_stat_int_text, sizeof(packed_stat_int_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX"_T, packed_stat_int_text, sizeof(packed_stat_int_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.packed_stat.int_text = packed_stat_int_text;
});
components::input_text("Value", packed_stat_int_value, sizeof(packed_stat_int_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, packed_stat_int_value, sizeof(packed_stat_int_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.packed_stat.int_value = packed_stat_int_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::packed_stat_set_int(packed_stat_int_text, packed_stat_int_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.packed_stat.int_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.packed_stat.int_read);
components::input_text("##read_result", packed_stat_int_read_result, sizeof(packed_stat_int_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
case BOOLEAN:
{
components::input_text("Index", packed_stat_bool_text, sizeof(packed_stat_bool_text), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_STAT_EDITOR_PACKED_STAT_INDEX"_T, packed_stat_bool_text, sizeof(packed_stat_bool_text), ImGuiInputTextFlags_None, [] {
g.stat_editor.packed_stat.bool_text = packed_stat_bool_text;
});
components::input_text("Value", packed_stat_bool_value, sizeof(packed_stat_bool_value), ImGuiInputTextFlags_None, [] {
components::input_text("VIEW_DEBUG_GLOBAL_VALUE"_T, packed_stat_bool_value, sizeof(packed_stat_bool_value), ImGuiInputTextFlags_None, [] {
g.stat_editor.packed_stat.bool_value = packed_stat_bool_value;
});
components::button("Apply", [] {
components::button("APPLY"_T, [] {
helper::packed_stat_set_bool(packed_stat_bool_text, packed_stat_bool_value);
});
ImGui::SameLine();
ImGui::Checkbox("Read", &g.stat_editor.packed_stat.bool_read);
ImGui::Checkbox("VIEW_STAT_EDITOR_READ"_T.data(), &g.stat_editor.packed_stat.bool_read);
components::input_text("##read_result", packed_stat_bool_read_result, sizeof(packed_stat_bool_read_result), ImGuiInputTextFlags_ReadOnly);
}
break;
@ -375,7 +376,7 @@ namespace big
{
ImGui::Text("0:Int\n1:Bool");
ImGui::Text("Example:\n31786\n0:123\n31786 32786\n1:1");
components::button("Import From Clipboard", [] {
components::button("IMPORT_FROM_CLIPBOARD"_T, [] {
std::string clipboard_text = ImGui::GetClipboardText();
std::vector<std::string> lines;
std::string line;
@ -468,9 +469,9 @@ namespace big
helper::packed_stat_get_bool(packed_stat_bool_text).c_str());
});
components::sub_title(std::format("Posix Time: {}-{}-{} {}:{}:{}", year, month, day, hour, minute, second));
components::sub_title(std::format("Character Index: {}", self::char_index));
components::sub_title("Be aware of stat limits, use with caution, modifying some stats are risky.");
components::sub_title(std::format("{}: {}-{}-{} {}:{}:{}", "VIEW_STAT_EDITOR_POSIX_TIME"_T, year, month, day, hour, minute, second));
components::sub_title(std::format("{}: {}", "VIEW_STAT_EDITOR_CHAR_INDEX"_T, self::char_index));
components::sub_title("VIEW_STAT_EDITOR_WARNING"_T);
if (ImGui::BeginTabBar("##stat_editor_tab_bar"))
{

View File

@ -64,7 +64,7 @@ namespace big
if (idx >= 0)
{
name = "FUN_VEHICLE_SEAT"_T.data() + std::to_string(idx + 1);
name = std::format("{} {}", "FUN_VEHICLE_SEAT"_T, (idx + 1)).c_str();
}
if ((idx + 1) % 4 != 0)
@ -257,7 +257,7 @@ namespace big
eExplosionTag selected_rocket_explosion = g.vehicle.vehicle_ammo_special.rocket_explosion_tag;
ImGui::BeginGroup();
components::sub_title("CUSTOM_VEH_WEAPONS_MG"_T.data());
components::sub_title("CUSTOM_VEH_WEAPONS_MG"_T);
if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name))
{
for (const auto& special_ammo : SPECIAL_AMMOS)
@ -304,7 +304,7 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup();
components::sub_title("CUSTOM_VEH_WEAPONS_MISSILE"_T.data());
components::sub_title("CUSTOM_VEH_WEAPONS_MISSILE"_T);
if (ImGui::BeginCombo(std::format("{}##customvehweaps", "EXPLOSION"_T).data(), BULLET_IMPACTS[selected_rocket_explosion]))
{
for (const auto& [type, name] : BULLET_IMPACTS)

View File

@ -207,7 +207,7 @@ namespace big
}
ImGui::SameLine();
if (components::button("Max Performance"))
if (components::button("MAX_VEHICLE"_T))
{
g_fiber_pool->queue_job([] {
vehicle::max_vehicle_performance(self::veh);
@ -287,7 +287,7 @@ namespace big
}
}
ImGui::SeparatorText("Mod Slots");
ImGui::SeparatorText("VIEW_LSC_MOD_SLOTS"_T.data());
ImGui::BeginGroup();
@ -364,7 +364,7 @@ namespace big
}
else
{
g_notification_service->push_error("LSC", "Selected mod is invalid");
g_notification_service->push_error("GUI_TAB_LSC"_T.data(), "VIEW_LSC_SELECTED_MOD_IS_INVALID"_T.data());
}
}
else if (selected_slot == MOD_WINDOW_TINT)
@ -456,13 +456,13 @@ namespace big
{
if (item_counter == 0)
{
ImGui::SeparatorText("Vehicle Extras");
ImGui::SeparatorText("VIEW_LSC_VEHICLE_EXTRAS"_T.data());
ImGui::BeginGroup();
}
if ((item_counter % 5) != 0)
ImGui::SameLine();
int gta_extra_id = (extra - MOD_EXTRA_0) * -1;
auto name = std::format("Extra #{}", gta_extra_id);
auto name = std::format("{}: #{}", "VIEW_LSC_EXTRAS"_T, gta_extra_id);
bool is_extra_enabled = owned_mods[extra] == 1;
if (ImGui::Checkbox(name.c_str(), &is_extra_enabled))
{

View File

@ -218,13 +218,13 @@ namespace big
void view::spawn_vehicle()
{
ImGui::RadioButton("New", &g.spawn_vehicle.spawn_type, 0);
ImGui::RadioButton("VIEW_DEBUG_THREADS_NEW"_T.data(), &g.spawn_vehicle.spawn_type, 0);
ImGui::SameLine();
ImGui::RadioButton("Personal", &g.spawn_vehicle.spawn_type, 1);
ImGui::RadioButton("VIEW_SPAWN_VEHICLE_PERSONAL"_T.data(), &g.spawn_vehicle.spawn_type, 1);
ImGui::SameLine();
ImGui::RadioButton("Persistent", &g.spawn_vehicle.spawn_type, 2);
ImGui::RadioButton("VIEW_SPAWN_VEHICLE_PERSISTENT"_T.data(), &g.spawn_vehicle.spawn_type, 2);
ImGui::SameLine();
ImGui::RadioButton("Xml", &g.spawn_vehicle.spawn_type, 3);
ImGui::RadioButton("VIEW_SPAWN_VEHICLE_XML"_T.data(), &g.spawn_vehicle.spawn_type, 3);
switch (g.spawn_vehicle.spawn_type)
{

View File

@ -17,7 +17,7 @@ namespace big
});
ImGui::SameLine();
components::button("Delete Current", [] {
components::button("DELETE"_T, [] {
auto handle = self::veh;
if (ENTITY::DOES_ENTITY_EXIST(handle))
TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped), entity::delete_entity(handle);

View File

@ -13,26 +13,26 @@ namespace big
void render_doors_tab()
{
const char* const doornames[MAX_VEHICLE_DOORS]{
"Front left",
"Front right",
"Back left",
"Back right",
"Bonnet",
"Trunk",
"VIEW_VEHICLE_CONTROL_DOOR_NAME_0"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_1"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_2"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_3"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_4"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_5"_T.data(),
};
const char* const locknames[MAX_VEHICLE_LOCK_STATES]{
"None",
"Unlocked",
"Locked",
"Lockout player only",
"Locked player inside",
"Locked initially",
"Force shut doors",
"Locked but damageable",
"Locked but boot unlocked",
"Locked no passengers",
"Cannot enter",
"VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_1"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_2"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_3"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_4"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_5"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_6"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_7"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_8"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_9"_T.data(),
"VIEW_VEHICLE_CONTROL_LOCKNAMES_10"_T.data(),
};
ImGui::BeginGroup();
@ -114,20 +114,20 @@ namespace big
void render_windows_tab()
{
const char* const windownames[4]{
"Front left",
"Front right",
"Back left",
"Back right",
"VIEW_VEHICLE_CONTROL_DOOR_NAME_0"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_1"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_2"_T.data(),
"VIEW_VEHICLE_CONTROL_DOOR_NAME_3"_T.data(),
};
ImGui::BeginGroup();
ImGui::Spacing();
ImGui::SetNextItemWidth(200);
components::button("Roll Down All", [] {
components::button("VIEW_VEHICLE_CONTROL_ROLL_DOWN_ALL"_T, [] {
g_vehicle_control_service.operate_window(eWindowId::WINDOW_INVALID_ID, true);
});
ImGui::SameLine();
components::button("Roll Up All", [] {
components::button("VIEW_VEHICLE_CONTROL_ROLL_UP_ALL"_T, [] {
g_vehicle_control_service.operate_window(eWindowId::WINDOW_INVALID_ID, false);
});
ImGui::EndGroup();
@ -142,11 +142,11 @@ namespace big
ImGui::PushID(i);
ImGui::Text(windownames[i]);
ImGui::SameLine(300);
components::button("Roll Down", [i] {
components::button("VIEW_VEHICLE_CONTROL_ROLL_DOWN"_T, [i] {
g_vehicle_control_service.operate_window((eWindowId)i, true);
});
ImGui::SameLine();
components::button("Roll Up", [i] {
components::button("VIEW_VEHICLE_CONTROL_ROLL_UP"_T, [i] {
g_vehicle_control_service.operate_window((eWindowId)i, false);
});
ImGui::PopID();
@ -156,10 +156,10 @@ namespace big
void render_lights_tab()
{
const char* const neonnames[4]{
"Left",
"Right",
"Front",
"Rear",
"LEFT"_T.data(),
"RIGHT"_T.data(),
"FRONT"_T.data(),
"BACK"_T.data(),
};
if (components::button("VEHICLE_CONTROLLER_TOGGLE_LIGHTS"_T))
@ -214,12 +214,12 @@ namespace big
* Seats start at index -1, compensate accordingly
*/
const char* const seatnames[6]{
"Driver",
"Passenger",
"Left rear",
"Right rear",
"Outside Left",
"Outside Right",
"DRIVER"_T.data(),
"VIEW_VEHICLE_CONTROL_PASSENGER"_T.data(),
"VIEW_VEHICLE_CONTROL_LEFT_REAR"_T.data(),
"VIEW_VEHICLE_CONTROL_RIGHT_REAR"_T.data(),
"VIEW_VEHICLE_CONTROL_OUTSIDE_LEFT"_T.data(),
"VIEW_VEHICLE_CONTROL_OUTSIDE_RIGHT"_T.data(),
};
static int movespeed = 1;
@ -250,15 +250,15 @@ namespace big
void render_misc_tab()
{
const char* const convertiblestates[4]{
"Up",
"Lowering",
"Down",
"Raising",
"VIEW_TELEPORT_UP"_T.data(),
"VIEW_VEHICLE_CONTROL_LOWERING"_T.data(),
"VIEW_TELEPORT_DOWN"_T.data(),
"VIEW_VEHICLE_CONTROL_RAISING"_T.data(),
};
if (g_vehicle_control_service.m_controlled_vehicle.isconvertible)
{
if (components::button(g_vehicle_control_service.m_controlled_vehicle.convertibelstate ? "Raise" : "Lower"))
if (components::button(g_vehicle_control_service.m_controlled_vehicle.convertibelstate ? "VIEW_VEHICLE_CONTROL_RAISE"_T : "VIEW_VEHICLE_CONTROL_LOWER"_T))
{
g_fiber_pool->queue_job([=] {
if (g.window.vehicle_control.operation_animation)
@ -272,10 +272,10 @@ namespace big
}
ImGui::SameLine();
ImGui::Text("Convertible state: %s", convertiblestates[g_vehicle_control_service.m_controlled_vehicle.convertibelstate]);
ImGui::Text(std::format("{}: {}", "VIEW_VEHICLE_CONTROL_CONVERTIBLE_STATE"_T, convertiblestates[g_vehicle_control_service.m_controlled_vehicle.convertibelstate]).c_str());
}
if (ImGui::Checkbox(g_vehicle_control_service.m_controlled_vehicle.engine ? "Stop" : "Start",
if (ImGui::Checkbox(g_vehicle_control_service.m_controlled_vehicle.engine ? "VIEW_DEBUG_ANIMATIONS_STOP"_T.data() : "SETTINGS_NOTIFY_GTA_THREADS_START"_T.data(),
&g_vehicle_control_service.m_controlled_vehicle.engine))
{
g_fiber_pool->queue_job([=] {
@ -291,9 +291,9 @@ namespace big
}
ImGui::SameLine();
ImGui::Text("Engine: %s", g_vehicle_control_service.m_controlled_vehicle.engine ? "Running" : "Off");
ImGui::Text(std::format("{}: {}", "VIEW_VEHICLE_CONTROL_ENGINE"_T, g_vehicle_control_service.m_controlled_vehicle.engine ? "VIEW_VEHICLE_CONTROL_ENGINE_RUNNING"_T : "OFF"_T).c_str());
components::button(g_vehicle_control_service.m_driver_performing_task ? "Cancel" : "Summon", [] {
components::button(g_vehicle_control_service.m_driver_performing_task ? "CANCEL"_T : "VIEW_VEHICLE_CONTROL_SUMMON"_T, [] {
if (!g_vehicle_control_service.m_driver_performing_task)
{
if (g.window.vehicle_control.operation_animation)
@ -308,18 +308,17 @@ namespace big
if (g_vehicle_control_service.m_driver_performing_task)
{
ImGui::SameLine();
ImGui::Text("Distance: %d", g_vehicle_control_service.m_distance_to_destination);
ImGui::Text(std::format("{}: {}", "VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T, g_vehicle_control_service.m_distance_to_destination).c_str());
ImGui::Text("Task: %s", g_vehicle_control_service.m_currentask);
ImGui::Text(std::format("{}: {}", "OUTFIT_TASK"_T, g_vehicle_control_service.m_currentask).c_str());
}
}
bool_command use_animations("vehcontroluseanims", "Use animations", "Will use animations for several vehicle operations such as:\ntoggling lights, opening/closing doors and entering seats",
bool_command use_animations("vehcontroluseanims", "VIEW_VEHICLE_CONTROL_USE_ANIMATIONS", "VIEW_VEHICLE_CONTROL_USE_ANIMATIONS_DESC",
g.window.vehicle_control.operation_animation);
bool_command render_veh_dist("vehcontrolrendervehdist", "Render distance on vehicle", "Will display the distance on the controlled vehicle",
bool_command render_veh_dist("vehcontrolrendervehdist", "VIEW_VEHICLE_CONTROL_RENDER_DISTANCE_ON_VEHICLE", "VIEW_VEHICLE_CONTROL_RENDER_DISTANCE_ON_VEHICLE_DESC",
g.window.vehicle_control.render_distance_on_veh);
float_command max_summon_dist("vehcontrolmaxsummondist", "Max summon distance", "At what range the vehicle will drive towards the summoned location as oposed to being teleported",
float_command max_summon_dist("vehcontrolmaxsummondist", "VIEW_VEHICLE_CONTROL_MAX_SUMMON_DISTANCE", "VIEW_VEHICLE_CONTROL_MAX_SUMMON_DISTANCE_DESC",
g.window.vehicle_control.max_summon_range, 10.f, 250.f);
void render_settings_tab()
@ -336,7 +335,7 @@ namespace big
ImGui::SetNextWindowPos(ImVec2(500.0f, 10.0f), ImGuiCond_FirstUseEver, ImVec2(0.0f, 0.0f));
ImGui::SetNextWindowBgAlpha(0.5f);
if (ImGui::Begin("Vehicle controller", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
if (ImGui::Begin("VEHICLE_CONTROLLER"_T.data(), nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
{
if (g_vehicle_control_service.m_controlled_vehicle_exists)
{
@ -345,42 +344,42 @@ namespace big
ImGui::Spacing();
if (ImGui::BeginTabBar("##vehiclecontroltabbar"))
{
if (ImGui::BeginTabItem("Doors"))
if (ImGui::BeginTabItem("VIEW_VEHICLE_CONTROL_DOORS"_T.data()))
{
render_doors_tab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Windows"))
if (ImGui::BeginTabItem("VIEW_VEHICLE_CONTROL_WINDOWS"_T.data()))
{
render_windows_tab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Lights"))
if (ImGui::BeginTabItem("VEHICLE_CONTROLLER_NEON_LIGHTS"_T.data()))
{
render_lights_tab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Seats"))
if (ImGui::BeginTabItem("FUN_VEHICLE_SEAT"_T.data()))
{
render_seats_tab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Misc"))
if (ImGui::BeginTabItem("SETTINGS_MISC"_T.data()))
{
render_misc_tab();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Settings"))
if (ImGui::BeginTabItem("GUI_TAB_SETTINGS"_T.data()))
{
render_settings_tab();
@ -393,7 +392,7 @@ namespace big
}
else
{
ImGui::Text("No vehicle available");
ImGui::Text("PLAYER_INFO_NO_VEHICLE"_T.data());
}
}
ImGui::End();

View File

@ -6,18 +6,18 @@ namespace big
{
components::command_checkbox<"blackhole">();
ImGui::SeparatorText("Entities");
ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data());
components::command_checkbox<"blackholeincvehs">();
ImGui::SameLine();
components::command_checkbox<"blackholeincpeds">();
ImGui::SeparatorText("Position");
ImGui::SeparatorText("VIEW_OVERLAY_POSITION"_T.data());
ImGui::InputFloat("X", &g.world.blackhole.pos.x, 5.f, 200.f);
ImGui::InputFloat("Y", &g.world.blackhole.pos.y, 5.f, 200.f);
ImGui::InputFloat("Z", &g.world.blackhole.pos.z, 5.f, 200.f);
ImGui::SliderFloat("Scale", &g.world.blackhole.scale, 2.f, 12.f, "%.0f");
ImGui::SliderFloat("VIEW_BLACKHOLE_SCALE"_T.data(), &g.world.blackhole.scale, 2.f, 12.f, "%.0f");
components::button("Set to current coords", [] {
components::button("VIEW_BLACKHOLE_SET"_T, [] {
const auto player_pos = g_local_player->get_position();
g.world.blackhole.pos.x = player_pos->x;
@ -25,9 +25,9 @@ namespace big
g.world.blackhole.pos.z = player_pos->z;
});
ImGui::SeparatorText("Customize Hole");
ImGui::SeparatorText("VIEW_BLACKHOLE_CUSTOM"_T.data());
ImGui::SetNextItemWidth(214);
ImGui::ColorPicker3("Color", g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex);
ImGui::SliderInt("Alpha", &g.world.blackhole.alpha, 0, 255);
ImGui::ColorPicker3("VIEW_BLACKHOLE_COLOR"_T.data(), g.world.blackhole.color, ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex);
ImGui::SliderInt("VIEW_BLACKHOLE_ALPHA"_T.data(), &g.world.blackhole.alpha, 0, 255);
}
}

View File

@ -5,9 +5,9 @@ namespace big
{
void view::model_swapper()
{
ImGui::Text("Models that have already been created will not be affected much");
ImGui::Text("Prefix 0x for hexadecimal hash");
ImGui::Text("Use context menu to copy entity hash");
ImGui::Text("VIEW_MODEL_SWAPPER_LINE1"_T.data());
ImGui::Text("VIEW_MODEL_SWAPPER_LINE2"_T.data());
ImGui::Text("VIEW_MODEL_SWAPPER_LINE3"_T.data());
static char dst_text[256];
static char src_text[256];
@ -15,22 +15,22 @@ namespace big
static float width = *g_pointers->m_gta.m_resolution_x / 5.0;
ImGui::SetNextItemWidth(width);
ImGui::InputText("Dst", dst_text, IM_ARRAYSIZE(dst_text));
ImGui::InputText("VIEW_MODEL_SWAPPER_DEST"_T.data(), dst_text, IM_ARRAYSIZE(dst_text));
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
ImGui::SameLine();
ImGui::SetNextItemWidth(width);
ImGui::InputText("Src", src_text, IM_ARRAYSIZE(src_text));
ImGui::InputText("VIEW_MODEL_SWAPPER_SRC"_T.data(), src_text, IM_ARRAYSIZE(src_text));
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
ImGui::SameLine();
if (ImGui::Button("Add/Change"))
if (ImGui::Button("ADD"_T.data()))
{
std::lock_guard lock(g.world.model_swapper.m);
if (dst_text[0] == '\0' || src_text[0] == '\0')
{
g_notification_service->push_error("Model Swapper", "Wrong input");
g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_WRONG_INPUT"_T.data());
return;
}
std::string str = dst_text;
@ -52,20 +52,20 @@ namespace big
g.world.model_swapper.update = true;
}
ImGui::SameLine();
if (ImGui::Button("Delete"))
if (ImGui::Button("DELETE"_T.data()))
{
std::lock_guard lock(g.world.model_swapper.m);
if (!g.world.model_swapper.models.size() || selected_index < 0
|| selected_index >= g.world.model_swapper.models.size())
{
g_notification_service->push_error("Model Swapper", "Invalid index");
g_notification_service->push_error("GUI_TAB_MODEL_SWAPPER"_T.data(), "VIEW_MODEL_SWAPPER_INVALID_INDEX"_T.data());
return;
}
g.world.model_swapper.models.erase(std::begin(g.world.model_swapper.models) + selected_index);
g.world.model_swapper.update = true;
}
ImGui::SameLine();
if (ImGui::Button("Clear"))
if (ImGui::Button("VIEW_DEBUG_GLOBAL_CLEAR"_T.data()))
{
std::lock_guard lock(g.world.model_swapper.m);
g.world.model_swapper.models.clear();
@ -73,7 +73,8 @@ namespace big
}
ImGui::SetNextItemWidth(width);
if (ImGui::BeginListBox("Dst##model_swapper_dst"))
ImGui::PushID(2);
if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_DEST"_T.data()))
{
for (size_t i = 0; i < g.world.model_swapper.models.size(); i++)
{
@ -91,7 +92,7 @@ namespace big
}
ImGui::SameLine();
ImGui::SetNextItemWidth(width);
if (ImGui::BeginListBox("Src##model_swapper_src"))
if (ImGui::BeginListBox("VIEW_MODEL_SWAPPER_SRC"_T.data()))
{
for (size_t i = 0; i < g.world.model_swapper.models.size(); i++)
{
@ -107,5 +108,6 @@ namespace big
}
ImGui::EndListBox();
}
ImGui::PopID();
}
}

View File

@ -536,12 +536,12 @@ namespace big
{
if (ImGui::BeginCombo("##ped_for",
(selected_ped_for_player_id == SPAWN_PED_FOR_SELF ?
"Self" :
"GUI_TAB_SELF"_T.data() :
(selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE ?
"Everyone" :
"VIEW_SPAWN_PED_EVERYONE"_T.data() :
g_player_service->get_by_id(selected_ped_for_player_id)->get_name()))))
{
if (ImGui::Selectable("Self", selected_ped_for_player_id == SPAWN_PED_FOR_SELF))
if (ImGui::Selectable("GUI_TAB_SELF"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_SELF))
{
selected_ped_for_player_id = SPAWN_PED_FOR_SELF;
}
@ -551,7 +551,7 @@ namespace big
ImGui::SetItemDefaultFocus();
}
if (ImGui::Selectable("Everyone", selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE))
if (ImGui::Selectable("VIEW_SPAWN_PED_EVERYONE"_T.data(), selected_ped_for_player_id == SPAWN_PED_FOR_EVERYONE))
{
selected_ped_for_player_id = SPAWN_PED_FOR_EVERYONE;
}
@ -597,9 +597,9 @@ namespace big
if (ImGui::IsItemHovered())
ImGui::SetTooltip("PREVIEW_DESC"_T.data());
ImGui::Checkbox("Invincible", &g.world.spawn_ped.spawn_invincible);
ImGui::Checkbox("Invisible", &g.world.spawn_ped.spawn_invisible);
ImGui::Checkbox("Attacker", &g.world.spawn_ped.spawn_as_attacker);
ImGui::Checkbox("VIEW_SPAWN_PED_INVINCIBLE"_T.data(), &g.world.spawn_ped.spawn_invincible);
ImGui::Checkbox("VIEW_SPAWN_PED_INVISIBLE"_T.data(), &g.world.spawn_ped.spawn_invisible);
ImGui::Checkbox("VIEW_SPAWN_PED_ATTACKER"_T.data(), &g.world.spawn_ped.spawn_as_attacker);
components::button("CHANGE_PLAYER_MODEL"_T, [] {
if (selected_ped_type == -2)
@ -657,23 +657,23 @@ namespace big
}
});
components::button("Spoof As Model", [] {
components::button("VIEW_SPAWN_PED_SPOOF_AS_MODEL"_T, [] {
g.spoofing.spoof_player_model = true;
g.spoofing.player_model = ped_model_buf;
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This WILL break freemode missions and jobs");
ImGui::SetTooltip("VIEW_SPAWN_PED_SPOOF_AS_MODEL_TOOLTIP"_T.data());
if (g.spoofing.spoof_player_model)
{
ImGui::SameLine();
components::button("Unspoof Model", [] {
components::button("VIEW_SPAWN_PED_UNSPOOF_MODEL"_T, [] {
g.spoofing.spoof_player_model = false;
});
}
components::button("Cleanup Spawned Peds", [] {
components::button("VIEW_SPAWN_PED_CLEANUP_SPAWNED_PEDS"_T, [] {
for (auto& ped : spawned_peds)
{
PED::DELETE_PED(&ped.ped_handle);

View File

@ -10,14 +10,14 @@ namespace big
void view::squad_spawner()
{
const char* const spawn_distance_modes[5]{"Custom", "On target", "Nearby", "Moderately distanced", "Far away"};
const char* const combat_ability_levels[3]{"Poor", "Average", "Professional"};
const char* const spawn_distance_modes[5]{"CUSTOM"_T.data(), "VIEW_SQUAD_SPAWNER_ON_TARGET"_T.data(), "VIEW_SQUAD_SPAWNER_NEARBY"_T.data(), "VIEW_SQUAD_SPAWNER_MODERATELY_DISTANCED"_T.data(), "VIEW_SQUAD_SPAWNER_FAR_AWAY"_T.data()};
const char* const combat_ability_levels[3]{"VIEW_SQUAD_SPAWNER_POOR"_T.data(), "VIEW_SQUAD_SPAWNER_AVERAGE"_T.data(), "VIEW_SQUAD_SPAWNER_PROFESSIONAL"_T.data()};
static squad new_template{};
static player_ptr victim = g_player_service->get_selected();
ImGui::SeparatorText("Victim");
ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_VICTIM"_T.data());
ImGui::SetNextItemWidth(200);
if (ImGui::BeginCombo("##victim", victim->get_name()))
{
@ -46,7 +46,7 @@ namespace big
if (victim->id() != g_player_service->get_selected()->id() && victim->is_valid())
{
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.3f, 1.0f));
ImGui::Text("Warning: Victim and selected player are not the same");
ImGui::Text("VIEW_SQUAD_SPAWNER_WARNING"_T.data());
ImGui::PopStyleColor();
}
@ -59,16 +59,16 @@ namespace big
if (ImGui::BeginPopupModal("##deletesquad"))
{
ImGui::Text("Are you sure you want to delete %s?", deletion_squad.m_name);
ImGui::Text("VIEW_SELF_ANIMATIONS_ARE_YOU_SURE_DELETE"_T.data(), deletion_squad.m_name);
if (ImGui::Button("Yes"))
if (ImGui::Button("YES"_T.data()))
{
g_squad_spawner_service.delete_squad(deletion_squad);
deletion_squad.m_name = "";
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No"))
if (ImGui::Button("NO"_T.data()))
{
deletion_squad.m_name = "";
ImGui::CloseCurrentPopup();
@ -79,9 +79,9 @@ namespace big
ImGui::SetNextItemWidth(200);
if (ImGui::BeginCombo("Choose From Templates", "Templates"))
if (ImGui::BeginCombo("VIEW_SQUAD_SPAWNER_CHOOSE_FROM_TEMPLATES"_T.data(), "VIEW_SQUAD_SPAWNER_TEMPLATES"_T.data()))
{
components::button("Fetch Custom Squads", [] {
components::button("VIEW_SQUAD_SPAWNER_FETCH_CUSTOM_SQUADS"_T, [] {
g_squad_spawner_service.fetch_squads();
});
@ -104,17 +104,17 @@ namespace big
ImGui::EndCombo();
}
if(ImGui::IsItemHovered())
ImGui::SetTooltip("Shift click to delete");
ImGui::SetTooltip("VIEW_SELF_ANIMATIONS_DOUBLE_SHIFT_CLICK_TO_DELETE"_T.data());
ImGui::SeparatorText("Squad Details");
ImGui::SeparatorText("VIEW_SQUAD_SPAWNER_SQUAD_DETAILS"_T.data());
ImGui::BeginGroup(); //Main variables
ImGui::Spacing();
ImGui::PushItemWidth(250);
components::input_text_with_hint("##name", "Name", new_template.m_name);
components::input_text_with_hint("##pedmodel", "Ped model", new_template.m_ped_model);
components::input_text_with_hint("##name", "NAME"_T, new_template.m_name);
components::input_text_with_hint("##pedmodel", "PED_MODEL"_T, new_template.m_ped_model);
auto ped_found = std::find_if(g_gta_data_service->peds().begin(), g_gta_data_service->peds().end(), [=](const auto& pair) {
return pair.second.m_name == new_template.m_ped_model;
@ -140,9 +140,9 @@ namespace big
}
}
components::input_text_with_hint("##vehmodel", "Vehicle model", new_template.m_vehicle_model);
components::input_text_with_hint("##vehmodel", "NAME_VEHICLE_MODEL"_T, new_template.m_vehicle_model);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Leave empty to spawn on foot");
ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_VEHICLE_TOOLTIP"_T.data());
auto veh_found = std::find_if(g_gta_data_service->vehicles().begin(), g_gta_data_service->vehicles().end(), [=](const auto& pair) {
return pair.second.m_name == new_template.m_vehicle_model;
@ -168,9 +168,9 @@ namespace big
}
}
components::input_text_with_hint("##weapmodel", "Weapon model", new_template.m_weapon_model);
components::input_text_with_hint("##weapmodel", "VIEW_SQUAD_SPAWNER_WEAPON_MODEL"_T.data(), new_template.m_weapon_model);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Leave empty to spawn unarmed, beware that a player can only attain 3 melee attackers at a time");
ImGui::SetTooltip("VIEW_SQUAD_SPAWNER_WEAPON_MODEL_TOOLTIP"_T.data());
auto weap_found = std::find_if(g_gta_data_service->weapons().begin(), g_gta_data_service->weapons().end(), [=](const auto& pair) {
return pair.second.m_name == new_template.m_weapon_model;
@ -197,7 +197,7 @@ namespace big
}
ImGui::Spacing();
ImGui::Text("Spawn Distance");
ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data());
if (ImGui::BeginCombo("##spawndistance", spawn_distance_modes[(int)new_template.m_spawn_distance_mode]))
{
for (int i = 0; i < 5; i++)
@ -207,7 +207,7 @@ namespace big
}
ImGui::EndCombo();
}
ImGui::Text("Squad Size");
ImGui::Text("VIEW_DEBUG_GLOBAL_SIZE"_T.data());
ImGui::SliderInt("##squadsize", &new_template.m_squad_size, 1, 8);
ImGui::PopItemWidth();
@ -215,13 +215,13 @@ namespace big
ImGui::SameLine();
ImGui::BeginGroup(); //General actions
ImGui::Text("Actions");
ImGui::Text("VIEW_SQUAD_SPAWNER_ACTIONS"_T.data());
ImGui::Spacing();
components::button(std::string("Terminate " + std::to_string(g_squad_spawner_service.m_active_squads.size()) + " squads"), [] {
components::button(std::format("{} {} {}", "SETTINGS_NOTIFY_GTA_THREADS_TERMINATE"_T, g_squad_spawner_service.m_active_squads.size(), "VIEW_SQUAD_SPAWNER_SQUADS"_T), [] {
g_squad_spawner_service.terminate_squads();
});
components::button("Reset Fields", [] {
components::button("VIEW_SQUAD_RESET_FIELDS"_T, [] {
new_template.m_spawn_distance_mode = eSquadSpawnDistance::CLOSEBY;
new_template.m_combat_ability_level = eCombatAbilityLevel::AVERAGE;
new_template.m_name.clear();
@ -229,7 +229,7 @@ namespace big
new_template.m_ped_model.clear();
new_template.m_vehicle_model.clear();
new_template.m_weapon_model.clear();
new_template.m_persistent_vehicle = "None";
new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data();
new_template.m_squad_size = 1;
new_template.m_ped_invincibility = 0;
new_template.m_veh_invincibility = 0;
@ -249,57 +249,57 @@ namespace big
ImGui::EndGroup();
ImGui::Spacing();
if (ImGui::TreeNode("Advanced Options"))
if (ImGui::TreeNode("VIEW_SELF_ANIMATIONS_ADVANCED_OPTIONS"_T.data()))
{
ImGui::BeginGroup(); //Toggleables
ImGui::Checkbox("Spawn Ahead", &new_template.m_spawn_ahead);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_AHEAD"_T.data(), &new_template.m_spawn_ahead);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Will use the distance specified and apply it in a forward direction to find a position ahead of the target");
ImGui::Checkbox("Favour Roads", &new_template.m_favour_roads);
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_AHEAD_TOOLTIP"_T.data());
ImGui::Checkbox("VIEW_SQUAD_SPAWN_FAVOR_ROADS"_T.data(), &new_template.m_favour_roads);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Will try and find a road first");
ImGui::Checkbox("Disperse", &new_template.m_disperse);
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_FAVOR_ROADS_TOOLTIP"_T.data());
ImGui::Checkbox("VIEW_SQUAD_SPAWN_DISPERSE"_T.data(), &new_template.m_disperse);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("If the squad is on foot, will scatter units within the spawn distance");
ImGui::Checkbox("Vehicle Catch Up", &new_template.m_spawn_behind_same_velocity);
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DISPERSE_TOOLTIP"_T.data());
ImGui::Checkbox("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP"_T.data(), &new_template.m_spawn_behind_same_velocity);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Will spawn the mobile squad behind the target with identical velocity if applicable.\nOnly for squads with a vehicle.");
ImGui::Checkbox("Stay In Vehicle", &new_template.m_stay_in_veh);
ImGui::Checkbox("Vehicle Mods Maxed", &new_template.m_max_vehicle);
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_VEHICLE_CATCH_UP_TOOLTIP"_T.data());
ImGui::Checkbox("VIEW_SQUAD_SPAWN_STAY_IN_VEHICLE"_T.data(), &new_template.m_stay_in_veh);
ImGui::Checkbox("MAX_VEHICLE"_T.data(), &new_template.m_max_vehicle);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Ped God Mode", &new_template.m_ped_invincibility);
ImGui::Checkbox("Vehicle God Mode", &new_template.m_veh_invincibility);
ImGui::Checkbox("Headshot Proof", &new_template.m_ped_proofs[0]);
ImGui::Checkbox("Bullet Proof", &new_template.m_ped_proofs[1]);
ImGui::Checkbox("Flame Proof", &new_template.m_ped_proofs[2]);
ImGui::Checkbox("Melee Proof", &new_template.m_ped_proofs[3]);
ImGui::Checkbox("Explosion Proof", &new_template.m_ped_proofs[4]);
ImGui::Checkbox("GOD_MODE"_T.data(), &new_template.m_ped_invincibility);
ImGui::Checkbox("VEHICLE_GOD"_T.data(), &new_template.m_veh_invincibility);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_HEADSHOT_PROOF"_T.data(), &new_template.m_ped_proofs[0]);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_BULLET_PROOF"_T.data(), &new_template.m_ped_proofs[1]);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_FLAME_PROOF"_T.data(), &new_template.m_ped_proofs[2]);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_MELEE_PROOF"_T.data(), &new_template.m_ped_proofs[3]);
ImGui::Checkbox("VIEW_SQUAD_SPAWN_EXPLOSION_PROOF"_T.data(), &new_template.m_ped_proofs[4]);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup(); //Slideables
ImGui::PushItemWidth(200);
ImGui::Text("Ped Health");
ImGui::Text("VIEW_PLAYER_INFO_HEALTH"_T.data());
ImGui::SliderFloat("##pedhealth", &new_template.m_ped_health, 0, 2000);
ImGui::Text("Ped Armor");
ImGui::Text("VIEW_SQUAD_SPAWN_ARMOR"_T.data());
ImGui::SliderFloat("##pedarmor", &new_template.m_ped_armor, 0, 2000);
ImGui::Text("Ped Accuracy");
ImGui::Text("VIEW_SQUAD_SPAWN_ACCURACY"_T.data());
ImGui::SliderFloat("##pedaccuracy", &new_template.m_ped_accuracy, 0, 100);
ImGui::Text("Custom Spawn Distance");
ImGui::Text("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data());
ImGui::SliderFloat("##customspawndistance", &new_template.m_spawn_distance, 0, 500);
ImGui::EndGroup();
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Leave these values at 0 to default, except for accuracy.");
ImGui::SetTooltip("VIEW_SQUAD_SPAWN_DEFAULT_TOOLTIP"_T.data());
ImGui::SameLine();
ImGui::BeginGroup(); //Chooseables
ImGui::Text("Combat Ability");
ImGui::Text("VIEW_SQUAD_SPAWN_COMBAT_ABILITY"_T.data());
if (ImGui::BeginCombo("##combatability", combat_ability_levels[(int)new_template.m_combat_ability_level]))
{
for (int i = 0; i < 3; i++)
@ -310,11 +310,11 @@ namespace big
ImGui::EndCombo();
}
ImGui::Text("Persistent Vehicle");
ImGui::Text("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE"_T.data());
if (ImGui::BeginCombo("##persistent_vehicle", new_template.m_persistent_vehicle.data()))
{
if (ImGui::Selectable("None", new_template.m_persistent_vehicle == "None"))
new_template.m_persistent_vehicle = "None";
if (ImGui::Selectable("VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data(), new_template.m_persistent_vehicle == "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data()))
new_template.m_persistent_vehicle = "VIEW_SQUAD_SPAWN_PERSISTENT_VEHICLE_NONE"_T.data();
for (auto& p : persist_car_service::list_files())
{
if (ImGui::Selectable(p.data(), p == new_template.m_persistent_vehicle))
@ -325,7 +325,7 @@ namespace big
ImGui::PopItemWidth();
ImGui::EndGroup();
components::input_text_with_hint("##new_template.m_description", "Description", new_template.m_description);
components::input_text_with_hint("##new_template.m_description", "VIEW_SQUAD_SPAWN_DESCRIPTION"_T, new_template.m_description);
ImGui::TreePop();
}
@ -333,12 +333,12 @@ namespace big
static auto check_validity = [=](bool save) -> bool {
if (!victim->is_valid() && !save)
{
g_notification_service->push_error("Squad spawner", "Choose a victim first");
g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_CHOOSE_FIRST"_T.data());
return false;
}
if (std::string(new_template.m_ped_model).empty())
{
g_notification_service->push_error("Squad spawner", "A ped model is required");
g_notification_service->push_error("GUI_TAB_SQUAD_SPAWNER"_T.data(), "VIEW_SQUAD_SPAWN_MODEL_REQUIRED"_T.data());
return false;
}
@ -360,32 +360,32 @@ namespace big
return exists;
};
components::button("Spawn Squad", [] {
components::button("VIEW_SQUAD_SPAWN_SPAWN_SQUAD"_T, [] {
try
{
if (check_validity(false))
g_squad_spawner_service.spawn_squad({new_template.m_name,
new_template.m_ped_model,
new_template.m_weapon_model,
new_template.m_vehicle_model,
new_template.m_squad_size,
new_template.m_ped_invincibility,
new_template.m_veh_invincibility,
new_template.m_ped_proofs,
new_template.m_ped_health,
new_template.m_ped_armor,
new_template.m_spawn_distance,
new_template.m_ped_accuracy,
new_template.m_spawn_distance_mode,
new_template.m_combat_ability_level,
new_template.m_stay_in_veh,
new_template.m_spawn_behind_same_velocity,
new_template.m_description,
new_template.m_disperse,
new_template.m_spawn_ahead,
new_template.m_favour_roads,
new_template.m_max_vehicle,
new_template.m_persistent_vehicle},
new_template.m_ped_model,
new_template.m_weapon_model,
new_template.m_vehicle_model,
new_template.m_squad_size,
new_template.m_ped_invincibility,
new_template.m_veh_invincibility,
new_template.m_ped_proofs,
new_template.m_ped_health,
new_template.m_ped_armor,
new_template.m_spawn_distance,
new_template.m_ped_accuracy,
new_template.m_spawn_distance_mode,
new_template.m_combat_ability_level,
new_template.m_stay_in_veh,
new_template.m_spawn_behind_same_velocity,
new_template.m_description,
new_template.m_disperse,
new_template.m_spawn_ahead,
new_template.m_favour_roads,
new_template.m_max_vehicle,
new_template.m_persistent_vehicle},
victim,
new_template.m_spawn_distance_mode == eSquadSpawnDistance::CUSTOM,
g_orbital_drone_service.m_ground_pos);
@ -397,7 +397,7 @@ namespace big
});
ImGui::SameLine();
components::button("Save", [] {
components::button("SAVE"_T, [] {
if (check_validity(true) && !check_if_exists(new_template.m_name))
g_squad_spawner_service.save_squad(new_template);
});

View File

@ -20,7 +20,7 @@ namespace big
if (g.world.override_weather)
{
if (ImGui::BeginCombo("Weather", weathers[g.world.local_weather]))
if (ImGui::BeginCombo("VIEW_TIME_AND_WEATHER_WEATHER"_T.data(), weathers[g.world.local_weather]))
{
for (int i = 0; i < weathers.size(); i++)
{

View File

@ -4,7 +4,7 @@ namespace big
{
void view::vfx()
{
ImGui::Checkbox("Enable Custom Sky Color", &g.vfx.enable_custom_sky_color);
ImGui::Checkbox("VIEW_VFX_ENABLE_CUSTOM_SKY_COLOR"_T.data(), &g.vfx.enable_custom_sky_color);
ImGui::ColorEdit4("VFX_AZIMUTH_EAST"_T.data(), (float*)&g.vfx.azimuth_east);
ImGui::ColorEdit4("VFX_AZIMUTH_WEST"_T.data(), (float*)&g.vfx.azimuth_west);

View File

@ -14,9 +14,9 @@ namespace big
view::time_and_weather();
}
ImGui::SeparatorText("Peds");
ImGui::SeparatorText("PED"_T.data());
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("Kill", [] {
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("VIEW_DEBUG_THREADS_KILL"_T, [] {
for (auto peds : entity::get_entities(false, true))
{
if (!PED::IS_PED_A_PLAYER(peds))
@ -25,7 +25,7 @@ namespace big
});
ImGui::SameLine();
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("Kill Enemies", [] {
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("VIEW_WORLD_KILL_ENEMIES"_T, [] {
for (auto ped : entity::get_entities(false, true))
{
if (!PED::IS_PED_A_PLAYER(ped))
@ -48,14 +48,13 @@ namespace big
components::command_checkbox<"pedrush">();
ImGui::SameLine();
components::command_checkbox<"autodisarm">();
components::options_modal("Auto Disarm", [] {
ImGui::Checkbox("Neutralize", &g.world.nearby.auto_disarm.neutralize);
components::options_modal("VIEW_WORLD_AUTO_DISARM"_T.data(), [] {
ImGui::Checkbox("VIEW_WORLD_NEUTRALIZE"_T.data(), &g.world.nearby.auto_disarm.neutralize);
});
ImGui::SeparatorText("Vehicles");
components::sub_title("Vehicles");
ImGui::SeparatorText("VEHICLES"_T.data());
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("Max Upgrade", [] {
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>("MAX_VEHICLE"_T, [] {
for (auto vehs : entity::get_entities(true, false))
{
if (entity::take_control_of(vehs))
@ -67,7 +66,7 @@ namespace big
});
ImGui::SameLine();
components::button<ImVec2(110, 0), ImVec4(0.4549f, 0.03529f, 0.03529f, 1.f)>("Downgrade", [] {
components::button<ImVec2(110, 0), ImVec4(0.4549f, 0.03529f, 0.03529f, 1.f)>("VIEW_WORLD_DOWNGRADE"_T, [] {
for (auto vehs : entity::get_entities(true, false))
{
if (entity::take_control_of(vehs))
@ -80,26 +79,26 @@ namespace big
components::command_checkbox<"vehiclerain">();
ImGui::SeparatorText("Entities");
ImGui::SeparatorText("VIEW_BLACKHOLE_ENTITIES"_T.data());
static bool included_entity_types[3];
static bool own_vehicle, deleting, force;
static int quantity, remaining;
ImGui::Text("Include:");
ImGui::Checkbox("Vehicles", &included_entity_types[0]);
ImGui::Text("VIEW_WORLD_INCLUDE"_T.data());
ImGui::Checkbox("VEHICLES"_T.data(), &included_entity_types[0]);
ImGui::SameLine();
ImGui::Checkbox("Peds", &included_entity_types[1]);
ImGui::Checkbox("PED"_T.data(), &included_entity_types[1]);
ImGui::SameLine();
ImGui::Checkbox("Props", &included_entity_types[2]);
ImGui::Checkbox("VIEW_WORLD_PROPS"_T.data(), &included_entity_types[2]);
if (included_entity_types[0])
{
ImGui::Checkbox("Self vehicle", &own_vehicle);
ImGui::Checkbox("VIEW_WORLD_SELF_VEHICLE"_T.data(), &own_vehicle);
ImGui::SameLine();
}
ImGui::Checkbox("Force", &force);
ImGui::Checkbox("FORCE"_T.data(), &force);
if (deleting)
{
@ -108,12 +107,12 @@ namespace big
}
else
{
components::button("Delete all", [&] {
components::button("VIEW_WORLD_DELETE_ALL"_T, [&] {
auto list = entity::get_entities(included_entity_types[0], included_entity_types[1], included_entity_types[2], own_vehicle);
quantity = list.size();
remaining = quantity;
g_notification_service->push("Entity Deletion", std::format("Deleting {} entities", quantity));
g_notification_service->push("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Deleting {} entities", quantity));
deleting = true;
int failed = 0;
@ -153,7 +152,7 @@ namespace big
}
if (failed > 0)
g_notification_service->push_warning("Entity Deletion", std::format("Failed deleting {} entities", failed));
g_notification_service->push_warning("GUI_TAB_TIME_N_WEATHER"_T.data(), std::format("Failed deleting {} entities", failed));
deleting = false;
});