fix(EmptySession): use translation in command label ()

This commit is contained in:
Andreas Maerten 2023-09-10 22:24:13 +02:00 committed by GitHub
parent 2c5bab8241
commit af53f6a76b
2 changed files with 8 additions and 7 deletions
src
backend/commands/session
views/network

@ -10,12 +10,13 @@ namespace big
using command::command;
virtual void execute(const command_arguments&, const std::shared_ptr<command_context> ctx) override
{
g_player_service->iterate([](const player_entry& player) {
auto mgr = *g_pointers->m_gta.m_network_player_mgr;
mgr->RemovePlayer(player.second->get_net_game_player());
});
g_notification_service->push_success("Empty Session", "Completed");
const auto player_mgr = *g_pointers->m_gta.m_network_player_mgr;
for (const auto& plyr : g_player_service->players() | std::ranges::views::values)
{
player_mgr->RemovePlayer(plyr->get_net_game_player());
}
g_notification_service->push("Empty Session", "Completed");
}
};
empty_session g_empty_session("emptysession", "Remove All Players From Session", "Removes everyone from the session", 0);
empty_session g_empty_session("emptysession", "EMPTY_SESSION", "Removes everyone from the session", 0);
}

@ -484,7 +484,7 @@ namespace big
},
true,
"TELEPORT"_T.data());
components::command_button<"emptysession">({}, "EMPTY_SESSION"_T.data());
components::command_button<"emptysession">();
components::sub_title("SCRIPT_HOST_FEATURES"_T);
ImGui::Checkbox("DISABLE_CEO_MONEY"_T.data(), &g.session.block_ceo_money);