generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TP to camp and Speed up moonshine production (#182)
* Tp to camp * Speed Up Moonshine Production
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 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,33 @@ | ||
#include "core/commands/LoopedCommand.hpp" | ||
#include "game/backend/Self.hpp" | ||
#include "game/rdr/Natives.hpp" | ||
#include "game/rdr/ScriptGlobal.hpp" | ||
#include "game/rdr/ScriptFunction.hpp" | ||
|
||
namespace YimMenu::Features | ||
{ | ||
class FastMoonshine : public LoopedCommand | ||
{ | ||
using LoopedCommand::LoopedCommand; | ||
|
||
virtual void OnTick() override | ||
{ | ||
static int LastCheck = 0; | ||
auto MoonshineGlobal = ScriptGlobal(1297600).At(Self::GetPlayer().GetId(), 87).At(19); | ||
|
||
if (!MoonshineGlobal.CanAccess() || MISC::GET_SYSTEM_TIME() - LastCheck < 1000) | ||
return; | ||
|
||
LastCheck = MISC::GET_SYSTEM_TIME(); | ||
|
||
auto BottleProgression = MoonshineGlobal.At(16); | ||
|
||
if (*BottleProgression.As<int*>() < 20) | ||
{ | ||
ScriptFunctions::TriggerMoonshineProduction(); | ||
} | ||
} | ||
}; | ||
|
||
static FastMoonshine _FastMoonshine{"fastmoonshine", "Fast Moonshine", "Speeds up moonshine production"}; | ||
} |
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,45 @@ | ||
#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 TpToCamp : public Command | ||
{ | ||
using Command::Command; | ||
static constexpr auto PlayerList = ScriptGlobal(1141332); | ||
|
||
virtual void OnCall() override | ||
{ | ||
if (!PlayerList.CanAccess()) | ||
return; | ||
|
||
for (int i = 0; i < 32; i++) | ||
{ | ||
if (*PlayerList.At(i, 27).At(9).As<int*>() == Self::GetPlayer().GetId() && *PlayerList.At(i, 27).As<int*>() != 3) | ||
{ | ||
auto Camp = ScriptGlobal(1141332).At(i, 27).At(20); | ||
|
||
if (!Camp.CanAccess()) | ||
return; | ||
|
||
Vector3 CampCoords = *Camp.As<Vector3*>(); | ||
if (CampCoords != Vector3(0.f, 0.f, 0.f)) | ||
{ | ||
YimMenu::Teleport::TeleportEntity(Self::GetPed().GetHandle(), CampCoords + Vector3(1, 0, 0), true); | ||
} | ||
else | ||
{ | ||
Notifications::Show("Camp", "Unable to find camp", NotificationType::Error); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
}; | ||
|
||
static TpToCamp _TpToCamp{"tptocamp", "Teleport To Camp", "Teleport to your camp"}; | ||
} |
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