add: try-catch block for SetRank function
This commit is contained in:
@@ -5,15 +5,21 @@
|
||||
#include <time.h>
|
||||
|
||||
void Misc::SetRank(int rank) {
|
||||
if (!Players::LocalPlayer) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (!Players::LocalPlayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
Unity::CComponent* NolanRankController = Players::LocalPlayer->GetComponent("NolanRankController");
|
||||
if (!NolanRankController) {
|
||||
return;
|
||||
Unity::CComponent* NolanRankController = Players::LocalPlayer->GetComponent("NolanRankController");
|
||||
if (!NolanRankController) {
|
||||
return;
|
||||
}
|
||||
|
||||
NolanRankController->CallMethodSafe<void*>("SetRank", rank);
|
||||
}
|
||||
catch (...) {
|
||||
settings::spoof_level = false;
|
||||
}
|
||||
NolanRankController->CallMethodSafe<void*>("SetRank", rank);
|
||||
}
|
||||
|
||||
void Misc::WalkInlobby(bool walk) {
|
||||
|
||||
Reference in New Issue
Block a user