Skip to content

Commit

Permalink
Assorted Fixes and New Features (#155)
Browse files Browse the repository at this point in the history
* Bump classes & Some fixes

* Some type fixes and shizz

* Emotes

* sex

* Whistle modifier

* I crave death

* uniformity is gud

* github is dogshit

* move emote.hpp to libraries directory

* cock and

* ball torture

* Fix CI Failure - Rxann

---------

Co-authored-by: Ryan <[email protected]>
  • Loading branch information
tyackman and Rxann authored Jul 2, 2024
1 parent 8a4433f commit cf8549e
Show file tree
Hide file tree
Showing 35 changed files with 432 additions and 103 deletions.
2 changes: 1 addition & 1 deletion cmake/rdr-classes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
rdr_classes
GIT_REPOSITORY https://github.com/YimMenu/RDR-Classes.git
GIT_TAG 99bae26b377a1075172caf4842889d24f8344054
GIT_TAG 722e3276338609dc980b15d2aeb38263300318fd
GIT_PROGRESS TRUE
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
82 changes: 50 additions & 32 deletions src/game/features/Features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ namespace YimMenu
{
Self::PlayerPed = PLAYER::PLAYER_PED_ID();
Self::Id = PLAYER::PLAYER_ID();
Self::Pos = ENTITY::GET_ENTITY_COORDS(Self::PlayerPed, true, true);
Self::Pos = ENTITY::GET_ENTITY_COORDS(Self::PlayerPed, TRUE, TRUE);
Self::Rot = ENTITY::GET_ENTITY_ROTATION(Self::PlayerPed, 2);

if (PED::IS_PED_IN_ANY_VEHICLE(Self::PlayerPed, true))
Self::Veh = PED::GET_VEHICLE_PED_IS_IN(Self::PlayerPed, true);
if (PED::IS_PED_IN_ANY_VEHICLE(Self::PlayerPed, TRUE))
Self::Veh = PED::GET_VEHICLE_PED_IS_IN(Self::PlayerPed, TRUE);
else
Self::Veh = 0;

Expand All @@ -44,13 +44,30 @@ namespace YimMenu
Self::IsOnMount = PED::IS_PED_ON_MOUNT(Self::PlayerPed);
}

void UpdateSelectedVars()
{
Selected::Pos = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(Players::GetSelected().GetId()), true, true);

Selected::Distance = MISC::GET_DISTANCE_BETWEEN_COORDS(Self::Pos.x,
Self::Pos.y,
Self::Pos.z,
Selected::Pos.x,
Selected::Pos.y,
Selected::Pos.z,
1);

Selected::current_health = ENTITY::GET_ENTITY_HEALTH(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(Players::GetSelected().GetId()));
Selected::max_health = ENTITY::GET_ENTITY_MAX_HEALTH(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(Players::GetSelected().GetId()), false);
Selected::health_percentage = (float)Selected::current_health / Selected::max_health * 100.0f;
}

void SpectateTick()
{
if (g_SpectateId != Players::GetSelected().GetId() && g_Spectating
&& ENTITY::DOES_ENTITY_EXIST(Players::GetSelected().GetPed().GetHandle()))
{
g_SpectateId = Players::GetSelected().GetId();
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(true, Players::GetSelected().GetPed().GetHandle());
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(TRUE, Players::GetSelected().GetPed().GetHandle());
}

if (g_Spectating && g_SpectateId == Players::GetSelected().GetId())
Expand All @@ -62,12 +79,12 @@ namespace YimMenu

if (!NETWORK::NETWORK_IS_IN_SPECTATOR_MODE() && ENTITY::DOES_ENTITY_EXIST(playerPed))
{
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(true, playerPed);
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(TRUE, playerPed);
}
if (!Players::GetSelected().IsValid())
{
STREAMING::CLEAR_FOCUS();
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(false, Self::PlayerPed);
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(FALSE, Self::PlayerPed);
g_Spectating = false;
Notifications::Show("Spectate", "Player is no longer in the session.\nSpectate mode disabled.", NotificationType::Warning);
}
Expand All @@ -77,7 +94,7 @@ namespace YimMenu
if (NETWORK::NETWORK_IS_IN_SPECTATOR_MODE())
{
STREAMING::CLEAR_FOCUS();
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(false, Self::PlayerPed);
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(FALSE, Self::PlayerPed);
CAM::_FORCE_LETTER_BOX_THIS_UPDATE();
CAM::_DISABLE_CINEMATIC_MODE_THIS_FRAME();
}
Expand Down Expand Up @@ -108,6 +125,7 @@ namespace YimMenu
{
Players::Tick();
UpdateSelfVars();
UpdateSelectedVars();
*Pointers.RageSecurityInitialized = false;
*Pointers.ExplosionBypass = true;
Commands::RunLoopedCommands();
Expand All @@ -124,31 +142,31 @@ namespace YimMenu
{
if (GUI::IsOpen())
{
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_LOOK_LR, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_LOOK_UD, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_AIM, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_MELEE_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_DRIVE_LOOK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_AIM, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_AIM, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_GUN_LR, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_GUN_UD, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_DRIVE_LOOK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_NEXT_WEAPON, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_PREV_WEAPON, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_AIM, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_AIM, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_ATTACK, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_ATTACK2, 1);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_LOOK_LR, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_LOOK_UD, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_AIM, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_MELEE_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_DRIVE_LOOK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_AIM, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_ATTACK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_AIM, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_ATTACK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_GUN_LR, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_HORSE_GUN_UD, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_DRIVE_LOOK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_ATTACK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_NEXT_WEAPON, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_PREV_WEAPON, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_AIM, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_CAR_ATTACK2, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_AIM, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_ATTACK, TRUE);
PAD::DISABLE_CONTROL_ACTION(0, (Hash)eNativeInputs::INPUT_VEH_BOAT_ATTACK2, TRUE);
}

ScriptMgr::Yield();
Expand Down
9 changes: 9 additions & 0 deletions src/game/features/Features.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ namespace YimMenu
inline bool IsOnMount;
}

namespace Selected
{
inline float Distance;
inline Vector3 Pos;
inline int current_health;
inline int max_health;
inline float health_percentage;
}

// TODO: move these out
inline bool g_Spectating = false;
inline int g_SpectateId = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/game/features/mount/HorseClimbSteepSlopes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ namespace YimMenu::Features
}
};

static HorseClimbSteepSlopes _HorseClimbSteepSlopes{"horseclimbsteepslopes", "Can Climb Steep Slopes", "Your horse can climb up/down sleep slopes without sliding"};
static HorseClimbSteepSlopes _HorseClimbSteepSlopes{"horseclimbsteepslopes", "Can Climb Steep Slopes", "Your horse can climb up/down steep slopes without sliding"};
}
4 changes: 2 additions & 2 deletions src/game/features/mount/HorseGodmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace YimMenu::Features

virtual void OnTick() override
{
ENTITY::SET_ENTITY_INVINCIBLE(Self::Mount, true);
ENTITY::SET_ENTITY_INVINCIBLE(Self::Mount, TRUE);
}

virtual void OnDisable() override
{
ENTITY::SET_ENTITY_INVINCIBLE(Self::Mount, false);
ENTITY::SET_ENTITY_INVINCIBLE(Self::Mount, FALSE);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/game/features/mount/HorseNoRagdoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace YimMenu::Features
virtual void OnTick() override
{
if(PED::CAN_PED_RAGDOLL(Self::Mount))
PED::SET_PED_CAN_RAGDOLL(Self::Mount, false);
PED::SET_PED_CAN_RAGDOLL(Self::Mount, FALSE);
}

virtual void OnDisable() override
{
PED::SET_PED_CAN_RAGDOLL(Self::Mount, true);
PED::SET_PED_CAN_RAGDOLL(Self::Mount, TRUE);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/game/features/players/toxic/CagePlayerLarge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace YimMenu::Features

virtual void OnCall(Player player) override
{
Vector3 coords = ENTITY::GET_ENTITY_COORDS(player.GetPed().GetHandle(), true, true);
Vector3 coords = ENTITY::GET_ENTITY_COORDS(player.GetPed().GetHandle(), TRUE, TRUE);
coords.z = coords.z - 1.0f;
SpawnObject(0x99C0CFCF, coords);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/features/players/toxic/CagePlayerSmall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace YimMenu::Features

virtual void OnCall(Player player) override
{
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player.GetId()), true, true);
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player.GetId()), TRUE, TRUE);
coords.z = coords.z - 1.0f;
SpawnObject(0xF3D580D3, coords);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/features/players/toxic/Circus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace YimMenu::Features
virtual void OnCall(Player player) override
{
float rot = ENTITY::GET_ENTITY_ROTATION(player.GetPed().GetHandle(), 0).z;
Vector3 coords = ENTITY::GET_ENTITY_COORDS(player.GetPed().GetHandle(), true, true);
Vector3 coords = ENTITY::GET_ENTITY_COORDS(player.GetPed().GetHandle(), TRUE, TRUE);
SpawnVehicle("wagonCircus01x", coords, rot);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/game/features/players/toxic/ExplodePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace YimMenu::Features
virtual void OnCall(Player player) override
{
auto playerCoords = player.GetPed().GetPosition();
FIRE::ADD_EXPLOSION(playerCoords.x, playerCoords.y, playerCoords.z, (int)ExplosionTypes::UNK, 10.0f, true, false, 5.0f);
FIRE::ADD_EXPLOSION(playerCoords.x, playerCoords.y, playerCoords.z, (int)ExplosionTypes::UNK, 10.0f, TRUE, FALSE, 5.0f);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/game/features/self/AntiHogtie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace YimMenu::Features

virtual void OnTick() override
{
ENTITY::_SET_ENTITY_CARRYING_FLAG(Self::PlayerPed, (int) eCarryingFlags::CARRYING_FLAG_CAN_BE_HOGTIED, false);
ENTITY::_SET_ENTITY_CARRYING_FLAG(Self::PlayerPed, (int)eCarryingFlags::CARRYING_FLAG_CAN_BE_HOGTIED, TRUE);

}

virtual void OnDisable() override
{
ENTITY::_SET_ENTITY_CARRYING_FLAG(Self::PlayerPed, (int) eCarryingFlags::CARRYING_FLAG_CAN_BE_HOGTIED, true);
ENTITY::_SET_ENTITY_CARRYING_FLAG(Self::PlayerPed, (int)eCarryingFlags::CARRYING_FLAG_CAN_BE_HOGTIED, FALSE);
}
};

Expand Down
16 changes: 8 additions & 8 deletions src/game/features/self/AntiLasso.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ namespace YimMenu::Features

virtual void OnTick() override
{
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED, false);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_AI, false);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_PLAYERS, false);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_DISABLE_IN_MP, true);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_CAN_BE_LASSOED, FALSE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_AI, FALSE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_PLAYERS, FALSE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_DISABLE_IN_MP, FALSE);
}

virtual void OnDisable() override
{
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED, true);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_AI, true);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_PLAYERS, true);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_DISABLE_IN_MP, false);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int) eLassoFlags::LHF_CAN_BE_LASSOED, TRUE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_AI, TRUE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_CAN_BE_LASSOED_BY_FRIENDLY_PLAYERS, TRUE);
PED::SET_PED_LASSO_HOGTIE_FLAG(Self::PlayerPed, (int)eLassoFlags::LHF_DISABLE_IN_MP, TRUE);
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/game/features/self/FlamingHooves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ namespace YimMenu

virtual void OnEnable() override
{
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, true);
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, TRUE);
}

virtual void OnTick() override
{
if (!PED::GET_PED_CONFIG_FLAG(Self::Mount, 207, true))
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, true);
if (!PED::GET_PED_CONFIG_FLAG(Self::Mount, 207, TRUE))
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, TRUE);
}

virtual void OnDisable() override
{
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, false);
PED::SET_PED_CONFIG_FLAG(Self::Mount, 207, FALSE);
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/game/features/self/Godmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ namespace YimMenu::Features

virtual void OnTick() override
{
if (!Self::PlayerPed || PED::IS_PED_DEAD_OR_DYING(Self::PlayerPed, true) || ENTITY::IS_ENTITY_DEAD(Self::PlayerPed))
if (!Self::PlayerPed || PED::IS_PED_DEAD_OR_DYING(Self::PlayerPed, TRUE) || ENTITY::IS_ENTITY_DEAD(Self::PlayerPed))
{
ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, false);
ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, FALSE);
return;
}

ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, true);
ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, TRUE);
}

virtual void OnDisable() override
{
ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, false);
ENTITY::SET_ENTITY_INVINCIBLE(Self::PlayerPed, FALSE);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/game/features/self/InfiniteAmmo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ namespace YimMenu::Features

virtual void OnTick() override
{
WEAPON::SET_PED_INFINITE_AMMO(Self::PlayerPed, true, 0);
WEAPON::SET_PED_INFINITE_AMMO(Self::PlayerPed, TRUE, 0);
}

virtual void OnDisable() override
{
WEAPON::SET_PED_INFINITE_AMMO(Self::PlayerPed, false, 0);
WEAPON::SET_PED_INFINITE_AMMO(Self::PlayerPed, FALSE, 0);
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/game/features/self/Invis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace YimMenu::Features

virtual void OnTick() override
{
ENTITY::SET_ENTITY_VISIBLE(Self::PlayerPed, false);
NETWORK::SET_PLAYER_VISIBLE_LOCALLY(Self::Id, true);
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);
ENTITY::SET_ENTITY_VISIBLE(Self::PlayerPed, TRUE);
NETWORK::SET_PLAYER_VISIBLE_LOCALLY(Self::Id, TRUE);
}
};

Expand Down
6 changes: 3 additions & 3 deletions src/game/features/self/KeepBarsFilled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace YimMenu::Features

virtual void OnTick() override
{
if (!Self::PlayerPed || PED::IS_PED_DEAD_OR_DYING(Self::PlayerPed, true) || ENTITY::IS_ENTITY_DEAD(Self::PlayerPed))
if (!Self::PlayerPed || PED::IS_PED_DEAD_OR_DYING(Self::PlayerPed, TRUE) || ENTITY::IS_ENTITY_DEAD(Self::PlayerPed))
return;

auto health_bar = ENTITY::GET_ENTITY_HEALTH(Self::PlayerPed);
auto stamina_bar = PLAYER::_GET_PLAYER_STAMINA(Self::Id);
auto deadeye_bar = PLAYER::_GET_PLAYER_DEAD_EYE(Self::Id);

if (health_bar < ENTITY::GET_ENTITY_MAX_HEALTH(Self::PlayerPed, false))
ENTITY::SET_ENTITY_HEALTH(Self::PlayerPed, ENTITY::GET_ENTITY_MAX_HEALTH(Self::PlayerPed, false), 0);
if (health_bar < ENTITY::GET_ENTITY_MAX_HEALTH(Self::PlayerPed, FALSE))
ENTITY::SET_ENTITY_HEALTH(Self::PlayerPed, ENTITY::GET_ENTITY_MAX_HEALTH(Self::PlayerPed, FALSE), 0);
if (stamina_bar < PED::_GET_PED_MAX_STAMINA(Self::PlayerPed))
PED::_CHANGE_PED_STAMINA(Self::PlayerPed, PED::_GET_PED_MAX_STAMINA(Self::PlayerPed));
if (deadeye_bar < PLAYER::_GET_PLAYER_MAX_DEAD_EYE(Self::Id, 0))
Expand Down
4 changes: 2 additions & 2 deletions src/game/features/self/NPCIgnore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace YimMenu::Features

virtual void OnTick() override
{
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, true);
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, TRUE);
}

virtual void OnDisable() override
{
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, false);
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::Id, FALSE);
}
};

Expand Down
Loading

0 comments on commit cf8549e

Please sign in to comment.