Converted all static strings to translation keys. (#2284)
This commit is contained in:
@ -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())
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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")))
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace big
|
||||
if (ImGui::InputScalar("RID"_T.data(), ImGuiDataType_S64, ¤t_player->rockstar_id)
|
||||
|| ImGui::Checkbox("IS_MODDER"_T.data(), ¤t_player->is_modder)
|
||||
|| ImGui::Checkbox("BLOCK_JOIN"_T.data(), ¤t_player->block_join)
|
||||
|| ImGui::Checkbox("Track Player", ¤t_player->notify_online))
|
||||
|| ImGui::Checkbox("VIEW_NET_PLAYER_DB_TRACK_PLAYER"_T.data(), ¤t_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", ¤t_player->join_redirect);
|
||||
ImGui::Checkbox("VIEW_NET_PLAYER_DB_JOIN_REDIRECT"_T.data(), ¤t_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", ¤t_player->join_redirect_preference, 1, 10);
|
||||
ImGui::SliderInt("VIEW_NET_PLAYER_DB_PREFERENCE"_T.data(), ¤t_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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user