Reactions, remote kick and better protections (#807)

* feat(Scripts): Complete GlobalPlayerBD
* feat(Scripts): add GPBD_Kicking
* feat(Scripts): start work on GPBD_FM_3
* feat(Scripts): add more to GPBD_FM_3
* feat(Scripts): complete GPBD_FM_3
* feat(Scripts): start work on GPBD_FM
* feat(Scripts): improve GPBD_FM
* feat(Scripts): complete GPBD_FM
* feat(Reactions): Add reactions
* feat(Protections): Improve protections
* feat(RemoteKick): Add remote kick
* feat(Stats): add KillsOnPlayers and DeathsByPlayers
* fix(Classes): Fix compiler warnings
This commit is contained in:
maybegreat48
2023-01-03 16:48:32 +00:00
committed by GitHub
parent 3db41c60f0
commit 10d0f317dc
62 changed files with 1039 additions and 882 deletions

View File

@ -1,6 +1,11 @@
#include "views/view.hpp"
#include "services/player_database/player_database_service.hpp"
#include "core/data/command_access_levels.hpp"
#include "core/scr_globals.hpp"
#include "core/data/language_codes.hpp"
#include <script/globals/GlobalPlayerBD.hpp>
#include <script/globals/GPBD_FM_3.hpp>
#include <script/globals/GPBD_FM.hpp>
namespace big
{
@ -119,6 +124,35 @@ namespace big
net_player_data->m_external_port).data());
}
ImGui::Separator();
auto id = g_player_service->get_selected()->id();
if (id != -1)
{
auto& stats = scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].PlayerStats;
auto& boss_goon = scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[id].BossGoon;
if (boss_goon.Language >= 0 && boss_goon.Language < 13)
ImGui::Text("Language: %s", languages[boss_goon.Language].name);
ImGui::Text("CEO Name: %s", boss_goon.GangName);
ImGui::Text("MC Name: %s", boss_goon.MCName);
ImGui::Text("Money In Wallet: %d", stats.WalletBalance);
ImGui::Text("Money In Bank: %d", stats.Money - stats.WalletBalance);
ImGui::Text("Total Money: %d", stats.Money);
ImGui::Text("Rank: %d (RP %d)", stats.Rank, stats.RP);
ImGui::Text("K/D Ratio: %f", stats.KdRatio);
ImGui::Text("Kills On Players: %d", stats.KillsOnPlayers);
ImGui::Text("Deaths By Players: %d", stats.DeathsByPlayers);
ImGui::Text("Prostitutes Frequented: %d", stats.ProstitutesFrequented);
ImGui::Text("Lap Dances Bought: %d", stats.LapDancesBought);
ImGui::Text("Missions Created: %d", stats.MissionsCreated);
ImGui::Text("Meltdown Complete: %s", scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "Yes" : "No"); // curious to see if anyone has actually played singleplayer
ImGui::Separator();
}
if (ImGui::BeginCombo("Chat Command Permissions", COMMAND_ACCESS_LEVELS[g_player_service->get_selected()->command_access_level.value_or(g.session.chat_command_default_access_level)]))
{
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)

View File

@ -20,6 +20,7 @@ namespace big
components::player_command_button<"bailkick">(g_player_service->get_selected());
components::player_command_button<"nfkick">(g_player_service->get_selected());
components::player_command_button<"oomkick">(g_player_service->get_selected());
components::player_command_button<"gikick">(g_player_service->get_selected());
components::player_command_button<"shkick">(g_player_service->get_selected());
components::player_command_button<"endkick">(g_player_service->get_selected());
components::player_command_button<"desync">(g_player_service->get_selected());

View File

@ -1,14 +1,4 @@
#include "views/view.hpp"
#include "util/teleport.hpp"
#include "core/scr_globals.hpp"
#include "util/ped.hpp"
#include "util/vehicle.hpp"
#include "util/globals.hpp"
#include "services/pickups/pickup_service.hpp"
#include "gta/net_object_mgr.hpp"
#include "util/scripts.hpp"
#include "util/session.hpp"
#include "script_function.hpp"
namespace big
{

View File

@ -11,6 +11,8 @@ namespace big
if (ImGui::TreeNode("Toxic"))
{
components::player_command_button<"kill">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::player_command_button<"explode">(g_player_service->get_selected(), {});
components::player_command_button<"ceokick">(g_player_service->get_selected(), {});
ImGui::SameLine();
@ -122,6 +124,18 @@ namespace big
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This cannot be reversed. Use with caution");
ImGui::Checkbox("Kill Loop", &g_player_service->get_selected()->kill_loop);
ImGui::SameLine();
ImGui::Checkbox("Explosion Loop", &g_player_service->get_selected()->explosion_loop);
ImGui::SameLine();
ImGui::Checkbox("Freeze Loop", &g_player_service->get_selected()->freeze_loop);
ImGui::Checkbox("Ragdoll Loop", &g_player_service->get_selected()->ragdoll_loop);
ImGui::SameLine();
ImGui::Checkbox("Rotate Cam Loop", &g_player_service->get_selected()->rotate_cam_loop);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Also brings the player out of godmode if the event isn't blocked");
ImGui::TreePop();
}
}