generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TP to Madam Nazar and Moonshine Shack, Recovery options, and ScriptFu…
…nction Static Call (#174)
- Loading branch information
Showing
8 changed files
with
274 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "core/commands/Command.hpp" | ||
#include "game/backend/Self.hpp" | ||
#include "game/rdr/ScriptGlobal.hpp" | ||
#include "util/teleport.hpp" | ||
|
||
namespace YimMenu::Features | ||
{ | ||
|
||
class TpToNazar : public Command | ||
{ | ||
using Command::Command; | ||
static constexpr auto NazarLocation = ScriptGlobal(1051832).At(4681); | ||
|
||
virtual void OnCall() override | ||
{ | ||
if (NazarLocation.CanAccess()) | ||
YimMenu::Teleport::TeleportEntity(Self::GetPed().GetHandle(), *NazarLocation.As<Vector3*>(), true); | ||
} | ||
}; | ||
|
||
static TpToNazar _TpToNazar{"tptonazar", "Teleport To Madam Nazar", "Teleport to Madam Nazar's current location"}; | ||
} |
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,34 @@ | ||
#include "core/commands/Command.hpp" | ||
#include "core/frontend/Notifications.hpp" | ||
#include "game/backend/Self.hpp" | ||
#include "game/rdr/ScriptGlobal.hpp" | ||
#include "util/teleport.hpp" | ||
|
||
namespace YimMenu::Features | ||
{ | ||
|
||
class TpToMoonshineShack : public Command | ||
{ | ||
using Command::Command; | ||
static constexpr auto ShackBlip = ScriptGlobal(1297441).At(128); | ||
|
||
virtual void OnCall() override | ||
{ | ||
if (ShackBlip.CanAccess()) | ||
{ | ||
Blip Shack = *ShackBlip.As<Blip*>(); | ||
if (MAP::DOES_BLIP_EXIST(Shack)) | ||
{ | ||
Vector3 ShackCoords = MAP::GET_BLIP_COORDS(Shack); | ||
YimMenu::Teleport::TeleportEntity(Self::GetPed().GetHandle(), ShackCoords, true); | ||
} | ||
else | ||
{ | ||
Notifications::Show("Moonshine Shack", "Unable to find moonshine shack blip", NotificationType::Error); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
static TpToMoonshineShack _TpToMoonshineShack{"tptomoonshineshack", "Teleport To Moonshine Shack", "Teleport to your moonshine shack"}; | ||
} |
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
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