Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Solution/source/Menu/Routine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1758,13 +1758,13 @@ void SetPedInvincibleOff(Ped ped)
}
void SetPedNoRagdollOn(Ped ped)
{
SET_PED_CAN_RAGDOLL(ped, 2);
SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, 2);
SET_PED_CAN_RAGDOLL(ped, 0);
SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, 0);
}
void SetPedNoRagdollOff(Ped ped)
{
SET_PED_CAN_RAGDOLL(ped, 0);
SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, 0);
SET_PED_CAN_RAGDOLL(ped, 1);
SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, 1);
}
void SetPedSeatbeltOn(Ped ped)
{
Expand Down
55 changes: 26 additions & 29 deletions Solution/source/Submenus/Bodyguards/BodyguardMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,37 @@ namespace sub
{
void BodyguardMainMenu()
{
bool bHealth_plus = false, bHealth_minus = false, bHealth_input = false;
bool bArmor_plus = false, bArmor_minus = false, bArmor_input = false;
int blipIndex = 0;
static const std::vector<std::pair<int, std::string>> blipOptions =
{
{ 1, "Standard" },
{ 280, "Friend" },
{ 480, "VIP" }
};
bool bBlipInput = false;
bool icon_plus = false, icon_minus = false;
bool oldGodmode = sub::BodyguardMenu::godmode;

int formationIndex = 0;
static const std::vector<std::pair<int, std::string>> formationOptions =
{
{ 0, "Default Formation" },
{ 1, "Circle (Inward)" },
{ 2, "Circle (North)" },
{ 3, "Line" }
};

bool bFormationInput = false;
bool form_plus = false, form_minus = false;
bool bTeleportBodyguards = false;

AddTitle("Bodyguards");

AddOption("Spawn Bodyguard", null, nullFunc, SUB::BODYGUARD_SPAWN);
AddOption("Bodyguard List", null, nullFunc, SUB::BODYGUARD_LIST);

static bool bHealth_plus = false, bHealth_minus = false, bHealth_input = false;
AddNumber("Default Health", sub::BodyguardMenu::health, 0, bHealth_input, bHealth_plus, bHealth_minus);
if (bHealth_plus && sub::BodyguardMenu::health < INT_MAX) ++sub::BodyguardMenu::health;
if (bHealth_minus && sub::BodyguardMenu::health > 0) --sub::BodyguardMenu::health;
Expand All @@ -152,7 +177,6 @@ namespace sub
}
}

static bool bArmor_plus = false, bArmor_minus = false, bArmor_input = false;
AddNumber("Default Armor", sub::BodyguardMenu::armor, 0, bArmor_input, bArmor_plus, bArmor_minus);
if (bArmor_plus && sub::BodyguardMenu::armor < INT_MAX) ++sub::BodyguardMenu::armor;
if (bArmor_minus && sub::BodyguardMenu::armor > 0) --sub::BodyguardMenu::armor;
Expand All @@ -166,7 +190,6 @@ namespace sub
}
}

bool oldGodmode = sub::BodyguardMenu::godmode;
AddToggle("Godmode", sub::BodyguardMenu::godmode);

if (oldGodmode != sub::BodyguardMenu::godmode)
Expand All @@ -182,22 +205,9 @@ namespace sub
}
}

static int blipIndex = 0;
static const std::vector<std::pair<int, std::string>> blipOptions =
{
{ 1, "Standard" },
{ 280, "Friend" },
{ 480, "VIP" }
};

// show labels using AddTexter
static bool bBlipInput = false;
bool icon_plus = false, icon_minus = false;

// current label from our restricted blipOptions array
AddTexter("Bodyguard Blip", 0, { blipOptions[blipIndex].second }, bBlipInput, icon_plus, icon_minus);

// scroll through our 3-choice array
if (icon_plus)
{
blipIndex = (blipIndex + 1) % blipOptions.size();
Expand All @@ -212,18 +222,6 @@ namespace sub
sub::BodyguardMenu::RefreshAllBodyguardBlips();
}

static int formationIndex = 0;
static const std::vector<std::pair<int, std::string>> formationOptions =
{
{ 0, "Default Formation" },
{ 1, "Circle (Inward)" },
{ 2, "Circle (North)" },
{ 3, "Line" }
};

static bool bFormationInput = false;
bool form_plus = false, form_minus = false;

AddTexter("Formation", 0, { formationOptions[formationIndex].second }, bFormationInput, form_plus, form_minus);

if (form_plus || form_minus)
Expand All @@ -237,7 +235,6 @@ namespace sub
PED::SET_GROUP_FORMATION(playerGroup, formationOptions[formationIndex].first);
}

bool bTeleportBodyguards = false;
AddOption("Bring Bodyguards To Self", bTeleportBodyguards);

if (bTeleportBodyguards)
Expand Down
16 changes: 16 additions & 0 deletions Solution/source/Submenus/PedAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,22 @@ namespace sub
}
return;
};
if (flagPlus)
{
for (auto it = AnimFlag::vFlagNames.begin(); it != AnimFlag::vFlagNames.end(); ++it)
{
if (it->first == g_customAnimFlag)
{
++it;
if (it != AnimFlag::vFlagNames.end())
{
g_customAnimFlag = it->first;
}
break;
}
}
return;
};
if (flagMinus)
{
for (auto it = AnimFlag::vFlagNames.rbegin(); it != AnimFlag::vFlagNames.rend(); ++it)
Expand Down
65 changes: 39 additions & 26 deletions Solution/source/Submenus/PlayerOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,30 +154,35 @@ namespace sub

if (invisibilityOff)
{
addlog(ige::LogType::LOG_TRACE, "Turning Off Invisibility");
myPed.SetVisible(!myPed.IsVisible());
}

if (noRagdollOff)
{
{
addlog(ige::LogType::LOG_TRACE, "Turning Off No Ragdoll");
SetPedNoRagdollOff(PLAYER_PED_ID());
return;
}
if (seatbeltOff)
{
{
addlog(ige::LogType::LOG_TRACE, "Turning Off Seatbelt");
SetPedSeatbeltOff(PLAYER_PED_ID());
return;
}

if (forceFieldPlus)
{
{
addlog(ige::LogType::LOG_TRACE, "Increase Force Field");
if (forceField < forceFieldNames.size() - 1)
{
forceField++;
return;
}
}
if (forceFieldMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Force Field");
if (forceField > 0)
{
forceField--;
Expand Down Expand Up @@ -217,6 +222,7 @@ namespace sub

if (ignoredByEveryoneOff)
{
addlog(ige::LogType::LOG_TRACE, "Ignore By Everyone Off");
Player temp = PLAYER_ID();
SET_POLICE_IGNORE_PLAYER(temp, neverWanted);
SET_EVERYONE_IGNORE_PLAYER(temp, 0);
Expand All @@ -227,18 +233,21 @@ namespace sub

if (neverWantedOn)
{
addlog(ige::LogType::LOG_TRACE, "Never Wanted On");
SET_PLAYER_WANTED_LEVEL(PLAYER_ID(), 0, 0);
SET_PLAYER_WANTED_LEVEL_NOW(PLAYER_ID(), 0);
return;
}
if (neverWantedOff)
{
addlog(ige::LogType::LOG_TRACE, "Never Wanted Off");
SET_MAX_WANTED_LEVEL(6);
SET_WANTED_LEVEL_MULTIPLIER(1.0f);
return;
}
if (wantedPlus)
{
addlog(ige::LogType::LOG_TRACE, "Increase Wanted Level");
if (wantedLevel < 6)
{
wantedLevel += 1;
Expand All @@ -255,6 +264,7 @@ namespace sub
}
if (wantedMinus)
{
addlog(ige::LogType::LOG_TRACE, "Decrease Wanted Level");
if (wantedLevel > 0)
{
if (wantedLevel == 1)
Expand All @@ -279,17 +289,20 @@ namespace sub

if (wantedFreezeOn)
{
addlog(ige::LogType::LOG_TRACE, "Freeze Wanted Level On");
selfFreezeWantedLevel = Game::Player().GetWantedLevel();
return;
}
if (wantedFreezeOff)
{
addlog(ige::LogType::LOG_TRACE, "Freeze Wanted Level Off");
selfFreezeWantedLevel = 0;
return;
}

if (burnModeOn)
{
addlog(ige::LogType::LOG_TRACE, "Burn Mode On");
if (GET_PLAYER_INVINCIBLE(g_Ped2))
{
SET_PLAYER_INVINCIBLE(g_Ped2, 0);
Expand All @@ -305,6 +318,7 @@ namespace sub
}
if (burnModeOff)
{
addlog(ige::LogType::LOG_TRACE, "Burn Mode Off");
if (IS_ENTITY_ON_FIRE(g_Ped1))
{
STOP_ENTITY_FIRE(g_Ped1);
Expand All @@ -314,41 +328,47 @@ namespace sub

if (heightPlus)
{
addlog(ige::LogType::LOG_TRACE, "Increase Height");
if (height < 2.5f)
{
height += 0.1f; GeneralGlobalHax::SetPlayerHeight(height);
}
}
if (heightMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Height");
if (height > -2.5f)
{
height -= 0.1f; GeneralGlobalHax::SetPlayerHeight(height);
}
}
if (movementSpeedPlus)
{
{
addlog(ige::LogType::LOG_TRACE, "Increase Movement Speed");
if (movementSpeed < 9.0f)
{
movementSpeed += 0.1f; GeneralGlobalHax::SetPlayerMovementSpeed(movementSpeed);
}
}
if (movementSpeedMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Movement Speed");
if (movementSpeed > 0.0f)
{
movementSpeed -= 0.1f; GeneralGlobalHax::SetPlayerMovementSpeed(movementSpeed);
}
}
if (swimSpeedPlus)
{
{
addlog(ige::LogType::LOG_TRACE, "Increase Swim Speed");
if (swimSpeed < 9.0f)
{
swimSpeed += 0.1f; GeneralGlobalHax::SetPlayerSwimSpeed(swimSpeed);
}
}
if (swimSpeedMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Swim Speed");
if (swimSpeed > 0.0f)
{
swimSpeed -= 0.1f; GeneralGlobalHax::SetPlayerSwimSpeed(swimSpeed);
Expand All @@ -357,6 +377,7 @@ namespace sub

if (movementSpeedModifierPlus)
{
addlog(ige::LogType::LOG_TRACE, "Increase Movement Speed Modifier");
if (swimSpeedMult < 1.40f)
{
swimSpeedMult += 0.1f;
Expand All @@ -365,6 +386,7 @@ namespace sub
}
if (movementSpeedModifierMinus)
{
addlog(ige::LogType::LOG_TRACE, "Decrease Movement Speed Modifier");
if (swimSpeedMult > 0.0f)
{
swimSpeedMult -= 0.1f;
Expand All @@ -373,28 +395,17 @@ namespace sub
}

if (sweatPlus)
{
{
addlog(ige::LogType::LOG_TRACE, "Increase Sweat");
if (selfSweatMult < 5.5f)
{
selfSweatMult += 0.1f;
}
return;
}
if (sweatMinus)
{
if (selfSweatMult > 0.0f)
{
selfSweatMult -= 0.1f;
}
if (selfSweatMult == 0.0f)
{
SET_PED_SWEAT(g_Ped1, selfSweatMult);
CLEAR_PED_WETNESS(g_Ped1);
}
return;
}
if (sweatMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Sweat");
if (selfSweatMult > 0.0f)
{
selfSweatMult -= 0.1f;
Expand All @@ -407,15 +418,17 @@ namespace sub
return;
}
if (noiseValuePlus)
{
{
addlog(ige::LogType::LOG_TRACE, "Increase Noise");
if (playerNoiseMult < 10.0f)
{
playerNoiseMult += 0.1f;
}
return;
}
if (noiseValueMinus)
{
{
addlog(ige::LogType::LOG_TRACE, "Decrease Noise");
if (playerNoiseMult > 0.0f)
{
playerNoiseMult -= 0.1f;
Expand Down
Loading
Loading