generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "core/commands/LoopedCommand.hpp" | ||
#include "game/features/Features.hpp" | ||
#include "game/rdr/Enums.hpp" | ||
#include "game/rdr/Natives.hpp" | ||
|
||
namespace YimMenu::Features | ||
{ | ||
//TODO: OnDisable doesn't call if menu is unloaded prematurely | ||
class Invis : public LoopedCommand | ||
{ | ||
using LoopedCommand::LoopedCommand; | ||
|
||
virtual void OnTick() override | ||
{ | ||
ENTITY::SET_ENTITY_VISIBLE(Self::PlayerPed, false); | ||
NETWORK::SET_PLAYER_VISIBLE_LOCALLY(Self::Id, true); | ||
} | ||
|
||
virtual void OnDisable() override | ||
{ | ||
ENTITY::SET_ENTITY_VISIBLE(Self::PlayerPed, true); | ||
NETWORK::SET_PLAYER_VISIBLE_LOCALLY(Self::Id, true); | ||
} | ||
}; | ||
|
||
static Invis _Invis{"invis", "Invisibility", "Be invisible"}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "core/commands/LoopedCommand.hpp" | ||
#include "game/features/Features.hpp" | ||
#include "game/rdr/Enums.hpp" | ||
#include "game/rdr/Natives.hpp" | ||
#include "game/rdr/ScriptGlobal.hpp" | ||
|
||
namespace YimMenu::Features | ||
{ | ||
class OffTheRadar : public LoopedCommand | ||
{ | ||
using LoopedCommand::LoopedCommand; | ||
|
||
virtual void OnTick() override | ||
{ | ||
if (*Pointers.IsSessionStarted) | ||
{ | ||
auto offtheradar = ScriptGlobal(1102813).At(3).As<int*>(); | ||
if (offtheradar) | ||
*offtheradar = 32; | ||
} | ||
} | ||
|
||
virtual void OnDisable() override | ||
{ | ||
if (*Pointers.IsSessionStarted) | ||
{ | ||
auto offtheradar = ScriptGlobal(1102813).At(3).As<int*>(); | ||
if (offtheradar) | ||
*offtheradar = 0; | ||
} | ||
} | ||
}; | ||
|
||
static OffTheRadar _OffTheRadar{"offtheradar", "Off The Radar", "You won't show up on the maps of other players"}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters