add: helper.cpp
This commit is contained in:
@@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
#include "../Features/Misc/Misc.hpp"
|
#include "../Features/Misc/Misc.hpp"
|
||||||
|
|
||||||
|
|
||||||
void OnUpdate() {
|
void OnUpdate() {
|
||||||
if (settings::spoof_level) {
|
if (settings::spoof_level) {
|
||||||
Misc::SetRank(settings::new_level);
|
Misc::SetRank(settings::new_level);
|
||||||
}
|
}
|
||||||
|
if (settings::walk_in_lobby) {
|
||||||
|
Misc::WalkInlobby(settings::walk_in_lobby);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,16 @@
|
|||||||
|
|
||||||
void Misc::SetRank(int rank) {
|
void Misc::SetRank(int rank) {
|
||||||
Players::LocalPlayer->GetComponent("NolanRankController")->CallMethodSafe<void*>("SetRank", rank);
|
Players::LocalPlayer->GetComponent("NolanRankController")->CallMethodSafe<void*>("SetRank", rank);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Misc::WalkInlobby(bool walk) {
|
||||||
|
Unity::CComponent* UltimateCharacterLocomotionHandler = Players::LocalPlayer->GetComponent("UltimateCharacterLocomotionHandler");
|
||||||
|
|
||||||
|
if (UltimateCharacterLocomotionHandler == NULL)
|
||||||
|
{
|
||||||
|
Players::LocalPlayer->AddComponent(IL2CPP::Class::GetSystemType("UltimateCharacterLocomotionHandler"));
|
||||||
|
Players::LocalPlayer->GetComponent("UltimateCharacterLocomotionHandler")->SetMemberValue<bool>("enabled", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Players::LocalPlayer->GetComponent("UltimateCharacterLocomotionHandler")->SetMemberValue<bool>("enabled", walk);
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace Misc {
|
namespace Misc {
|
||||||
|
|
||||||
void SetRank(int rank);
|
void SetRank(int rank);
|
||||||
|
void WalkInlobby(bool walk);
|
||||||
}
|
}
|
||||||
3
DevourClient/Utils/Helpers/Helpers.cpp
Normal file
3
DevourClient/Utils/Helpers/Helpers.cpp
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "Helpers.hpp"
|
||||||
|
|
||||||
|
//define functions the same as in misc.hpp/cpp
|
||||||
12
DevourClient/Utils/Helpers/Helpers.hpp
Normal file
12
DevourClient/Utils/Helpers/Helpers.hpp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../Dependencies/IL2CPP_Resolver/il2cpp_resolver.hpp"
|
||||||
|
#include "../../Utils/Players/Players.hpp"
|
||||||
|
#include "../../Utils/Settings/Settings.hpp"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
//define functions the same as in misc.hpp/cpp
|
||||||
|
namespace Helpers {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user