Skip to content

Commit

Permalink
fix all issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxann committed Mar 23, 2024
1 parent fc6dda2 commit 759e2a8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 46 deletions.
21 changes: 0 additions & 21 deletions src/game/features/players/toxic/Ragdoll.cpp

This file was deleted.

14 changes: 5 additions & 9 deletions src/game/features/self/Drunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ namespace YimMenu::Features
{
using LoopedCommand::LoopedCommand;

virtual void OnEnable() override
{
Notifications::Show("Drunk", "You are now drunk!", NotificationType::Success);
}


virtual void OnTick() override
{
AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, true);
Expand All @@ -24,9 +18,11 @@ namespace YimMenu::Features

virtual void OnDisable() override
{
AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, false);
PED::_SET_PED_DRUNKNESS(Self::PlayerPed, false, 0.0f);
Notifications::Show("Drunk", "You are now sober!", NotificationType::Success);
if (PED::_GET_PED_DRUNKNESS(Self::PlayerPed))
{
AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, false);
PED::_SET_PED_DRUNKNESS(Self::PlayerPed, false, 0.0f);
}
}
};

Expand Down
7 changes: 0 additions & 7 deletions src/game/features/self/NPCIgnore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ namespace YimMenu::Features
{
using LoopedCommand::LoopedCommand;

virtual void OnEnable() override
{
Notifications::Show("NPC Ignore", "You are now ignored!", NotificationType::Success);
}


virtual void OnTick() override
{
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, true);
Expand All @@ -24,7 +18,6 @@ namespace YimMenu::Features
virtual void OnDisable() override
{
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, false);
Notifications::Show("NPC Ignore", "You are no longer ignored!", NotificationType::Success);
}
};

Expand Down
7 changes: 5 additions & 2 deletions src/game/frontend/submenus/Network.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#include "Network.hpp"

#include "core/commands/Commands.hpp"
#include "core/commands/HotkeySystem.hpp"
#include "core/commands/LoopedCommand.hpp"
#include "game/features/Features.hpp"
#include "game/frontend/items/Items.hpp"


namespace YimMenu::Submenus
{
Network::Network() :
Submenu::Submenu("Network")
{
auto session = std::make_shared<Category>("Session");
auto spoofing = std::make_shared<Category>("Spoofing");
auto session = std::make_shared<Category>("Session");
auto spoofing = std::make_shared<Category>("Spoofing");
session->AddItem(std::make_shared<CommandItem>("explodeall"_J));
session->AddItem(std::make_shared<CommandItem>("maxhonorall"_J));
session->AddItem(std::make_shared<CommandItem>("minhonorall"_J));
session->AddItem(std::make_shared<BoolCommandItem>("blockalltelemetry"_J));
spoofing->AddItem(std::make_shared<BoolCommandItem>("hidegod"_J));
AddCategory(std::move(session));
AddCategory(std::move(spoofing));
Expand Down
3 changes: 1 addition & 2 deletions src/game/frontend/submenus/Players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include "util/network.hpp"
#include "util/teleport.hpp"


#include <string>



// remove after testing
#include "core/frontend/Notifications.hpp"
#include "game/backend/FiberPool.hpp"
Expand Down Expand Up @@ -193,7 +193,6 @@ namespace YimMenu::Submenus
toxic->AddItem(std::make_shared<PlayerCommandItem>("offensive"_J));
toxic->AddItem(std::make_shared<PlayerCommandItem>("maxhonor"_J));
toxic->AddItem(std::make_shared<PlayerCommandItem>("minhonor"_J));
toxic->AddItem(std::make_shared<PlayerCommandItem>("ragdoll"_J));

toxic->AddItem(std::make_shared<ImGuiItem>([] {
if (ImGui::Button("Test"))
Expand Down
9 changes: 9 additions & 0 deletions src/game/hooks/Anticheat/SendMetric.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#include "core/commands/BoolCommand.hpp"
#include "core/commands/Commands.hpp"
#include "core/hooking/DetourHook.hpp"
#include "game/hooks/Hooks.hpp"
#include "unordered_set"

#include <rage/rlJson.hpp>
#include <rage/rlMetric.hpp>


namespace YimMenu::Features
{
BoolCommand _LogMetrics("logmetrics", "Log Metrics", "Log game telemetry");
BoolCommand _BlockAllTelemetry("blockalltelemetry", "Block All Telemetry", "Block all game telemetry");
}

namespace YimMenu::Hooks
Expand All @@ -29,6 +32,12 @@ namespace YimMenu::Hooks

if (Features::_LogMetrics.GetState())
LOG(INFO) << "METRIC: " << metric_name << "; DATA: " << serializer.GetBuffer();

if (Features::_BlockAllTelemetry.GetState())
{
return true;
}

return BaseHook::Get<Anticheat::SendMetric, DetourHook<decltype(&Anticheat::SendMetric)>>()->Original()(manager, metric);
}
}
8 changes: 3 additions & 5 deletions src/util/SpawnPed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace YimMenu
{
FiberPool::Push([=] {
Hash model = MISC::GET_HASH_KEY(model_name.c_str());
LOG(INFO) << "FOUND HASH";
if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_VALID(model))
{
if (!STREAMING::HAS_MODEL_LOADED(model))
Expand All @@ -19,17 +18,16 @@ namespace YimMenu
ScriptMgr::Yield();
}

Vector3 coords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 3.0, -0.3);
auto ped = PED::CREATE_PED(model, coords.x, coords.y, coords.z, static_cast<float>(rand() % 360), 0, 0, 0, 0);

Vector3 coords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 3.0, -0.3);
float playerRotation = ENTITY::GET_ENTITY_ROTATION(playerPed, 2).x;
auto ped = PED::CREATE_PED(model, coords.x, coords.y, coords.z, playerRotation, 0, 0, 0, 0);

ScriptMgr::Yield();
PED::_SET_RANDOM_OUTFIT_VARIATION(ped, true);
ENTITY::SET_ENTITY_ALPHA(ped, 255, 0);
ENTITY::SET_ENTITY_VISIBLE(ped, true);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);
NETWORK::NETWORK_REGISTER_ENTITY_AS_NETWORKED(ped);
NETWORK::NETWORK_SET_ENTITY_ONLY_EXISTS_FOR_PARTICIPANTS(ped, false);

int id = NETWORK::PED_TO_NET(ped);
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(id))
Expand Down

0 comments on commit 759e2a8

Please sign in to comment.