Add no radar rot (jeremii), player regen, armour cmd
This commit is contained in:
parent
91cf68ab03
commit
366b42de61
@ -202,6 +202,10 @@ RAMUsage = "RAM usage: %.2f%%"
|
||||
ResetConfig = "Reset config"
|
||||
ResetConfigMSG = "Config has been reset. Restart the game for it to take effect."
|
||||
ResetSize = "Reset size"
|
||||
SetArmourCMD = "Set armour"
|
||||
SetArmourCMDText = """
|
||||
Set player armour.
|
||||
Example: armour (armour value)."""
|
||||
SetHealthCMD = "Set health"
|
||||
SetHealthCMDText = """
|
||||
Set player health.
|
||||
@ -335,8 +339,6 @@ GodDisabled = "God mode disabled"
|
||||
GodEnabled = "God mode enabled"
|
||||
GodMode = "God mode"
|
||||
Health = "Health"
|
||||
HealthRegen = "Health regeneration"
|
||||
HealthRegenTip = "Player heals if not taken damage for 5 seconds"
|
||||
InfO2 = "Infinite oxygen"
|
||||
InfSprint = "Infinite sprint"
|
||||
InvisPlayer = "Invisible player"
|
||||
@ -356,6 +358,8 @@ NeverWanted = "Never wanted"
|
||||
NoFee = "No arrest fee"
|
||||
PedSkinsTab = "Ped skins"
|
||||
PlayerFlags = "Player flags,"
|
||||
PlayerRegen = "Player regeneration"
|
||||
PlayerRegenTip = "Player heals if not taken damage for 5 seconds"
|
||||
RemoveAll = "Remove all"
|
||||
RemoveClothesTab = "Remove clothes"
|
||||
RespawnDieLoc = "Respawn die location"
|
||||
@ -428,7 +432,7 @@ AutoDriveNoVeh = "You need to be inside a vehicle!"
|
||||
AutoDriveCoord = "Drive to coordinates"
|
||||
AutoDriveMarker = "Drive to marker"
|
||||
AutoDriveStop = "Stop driving"
|
||||
AutoDriveInfo = """Automatically drives you to selected location. This doesn't work very well and AI might get stuck!"""
|
||||
AutoDriveInfo = """Automatically drives you to selected location. This doesn't work very well and vehicle might get stuck!"""
|
||||
AutoUnflip = "Auto unflip"
|
||||
Big = "Big"
|
||||
BikeFly = "Bikes fly"
|
||||
@ -683,6 +687,7 @@ NoMoneyZeros = "No money zeros"
|
||||
NoOutline = "No outline"
|
||||
NoParticles = "No particle effects"
|
||||
NoPostFX = "No postfx"
|
||||
NoRadarRot = "No radar rotation"
|
||||
NoWater = "No water"
|
||||
PoleShadowStrength = "Pole shadow strength"
|
||||
PostFX1 = "PostFX 1"
|
||||
|
@ -15,7 +15,7 @@ private:
|
||||
static inline const char* fileExt = ".toml";
|
||||
std::unique_ptr<toml::table> pTable;
|
||||
std::string path;
|
||||
|
||||
|
||||
public:
|
||||
typedef toml::table Table;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define MENU_NAME "Cheat Menu"
|
||||
#define MENU_VERSION_NUMBER "3.3"
|
||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||
#define BUILD_NUMBER "20220708"
|
||||
#define BUILD_NUMBER "20220721"
|
||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
|
||||
|
||||
#ifdef GTASA
|
||||
|
21
src/menu.cpp
21
src/menu.cpp
@ -216,6 +216,20 @@ void Menu::ProcessCommands()
|
||||
std::string command;
|
||||
ss >> command;
|
||||
|
||||
if (command == "armour")
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string temp;
|
||||
ss >> temp;
|
||||
FindPlayerPed()->m_fArmour = std::stof(temp);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
SetHelpMessage(TEXT("Menu.InvalidValue"));
|
||||
}
|
||||
}
|
||||
|
||||
if (command == "hp")
|
||||
{
|
||||
try
|
||||
@ -491,6 +505,13 @@ void Menu::ShowPage()
|
||||
{
|
||||
ImGui::TextWrapped(TEXT("Menu.OpenCMDUsing"), commandWindow.GetNameString().c_str());
|
||||
ImGui::Spacing();
|
||||
if (ImGui::CollapsingHeader(TEXT("Menu.SeArmourCMD")))
|
||||
{
|
||||
ImGui::Spacing();
|
||||
ImGui::TextWrapped(TEXT("Menu.SetArmourCMDText"));
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
}
|
||||
if (ImGui::CollapsingHeader(TEXT("Menu.SetHealthCMD")))
|
||||
{
|
||||
ImGui::Spacing();
|
||||
|
@ -137,29 +137,41 @@ void Player::Init()
|
||||
{
|
||||
uint timer = CTimer::m_snTimeInMilliseconds;
|
||||
CPlayerPed* player = FindPlayerPed();
|
||||
CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus];
|
||||
int hplayer = CPools::GetPedRef(player);
|
||||
|
||||
if (m_bHealthRegen)
|
||||
if (m_bPlayerRegen)
|
||||
{
|
||||
static uint lastDmgTimer = 0;
|
||||
static uint lastHealTimer = 0;
|
||||
static float health = 0;
|
||||
static uint lastDmg = 0;
|
||||
static uint lastTimer = 0;
|
||||
float maxHealth = BY_GAME(player->m_fMaxHealth, 100, 100);
|
||||
float maxArmour = BY_GAME(pInfo->m_nMaxArmour, pInfo->m_nMaxArmour, 100);
|
||||
|
||||
if (player->m_fHealth != health)
|
||||
static float prevVal = 0;
|
||||
float curVal = (player->m_fHealth == player->m_fMaxHealth) ? player->m_fHealth : player->m_fArmour;
|
||||
if (curVal != prevVal)
|
||||
{
|
||||
health = player->m_fHealth;
|
||||
lastDmgTimer = timer;
|
||||
lastDmg = timer;
|
||||
curVal = prevVal;
|
||||
}
|
||||
|
||||
if (player->m_fHealth != maxHealth
|
||||
&& timer - lastDmgTimer > 5000
|
||||
&& timer - lastHealTimer > 1000
|
||||
)
|
||||
if (timer - lastDmg > 5000 && timer - lastTimer > 1000)
|
||||
{
|
||||
player->m_fHealth += 0.2f;
|
||||
lastHealTimer = timer;
|
||||
health = player->m_fHealth;
|
||||
if (player->m_fHealth != maxHealth || player->m_fArmour != maxArmour)
|
||||
{
|
||||
if (player->m_fHealth != maxHealth)
|
||||
{
|
||||
player->m_fHealth += 0.2f;
|
||||
prevVal = player->m_fHealth;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->m_fArmour += 0.2f;
|
||||
prevVal = player->m_fArmour;
|
||||
}
|
||||
|
||||
lastTimer = timer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -493,7 +505,6 @@ void Player::ShowPage()
|
||||
pPlayer->m_nFlags.bMeleeProof = m_bGodMode;
|
||||
#endif
|
||||
}
|
||||
Widget::Checkbox(TEXT("Player.HealthRegen"), &m_bHealthRegen, TEXT("Player.HealthRegenTip"));
|
||||
#ifdef GTASA
|
||||
Widget::CheckboxAddr(TEXT("Player.CycleJump"), 0x969161);
|
||||
Widget::CheckboxAddr(TEXT("Player.InfO2"), 0x96916E);
|
||||
@ -555,7 +566,7 @@ void Player::ShowPage()
|
||||
#endif
|
||||
Widget::CheckboxAddr(TEXT("Player.NoFee"), (int)&pInfo->m_bGetOutOfJailFree);
|
||||
Widget::Checkbox(TEXT("Player.RespawnDieLoc"), &KeepPosition::m_bEnabled, TEXT("Player.RespawnDieLocTip"));
|
||||
|
||||
Widget::Checkbox(TEXT("Player.PlayerRegen"), &m_bPlayerRegen, TEXT("Player.PlayerRegenTip"));
|
||||
#ifdef GTASA
|
||||
static bool sprintInt = false;
|
||||
if (Widget::Checkbox(TEXT("Player.SprintEverywhere"), &sprintInt, TEXT("Player.SprintEverywhereTip")))
|
||||
|
@ -4,7 +4,7 @@
|
||||
class Player
|
||||
{
|
||||
private:
|
||||
static inline bool m_bHealthRegen;
|
||||
static inline bool m_bPlayerRegen;
|
||||
static inline bool m_bGodMode;
|
||||
static inline bool m_bModloaderInstalled;
|
||||
struct KeepPosition
|
||||
|
@ -755,7 +755,33 @@ void Visual::ShowPage()
|
||||
}
|
||||
}
|
||||
Widget::CheckboxAddr(TEXT("Visual.NoPostFX"), 0xC402CF);
|
||||
|
||||
if (Widget::Checkbox(TEXT("Visual.NoRadarRot"), &m_bNoRadarRot))
|
||||
{
|
||||
// Credits: jeremii (bjeremii.blogspot.com)
|
||||
if (m_bNoRadarRot)
|
||||
{
|
||||
patch::Set<float>(0xBA8310, 0.0);
|
||||
patch::Set<float>(0xBA830C, 0.0);
|
||||
patch::Set<float>(0xBA8308, 1.0);
|
||||
|
||||
// stop map rotaiton
|
||||
patch::Nop(0x5837FB, 6);
|
||||
patch::Nop(0x583805, 6);
|
||||
patch::Nop(0x58380D, 6);
|
||||
patch::Nop(0x5837D6, 6);
|
||||
patch::Nop(0x5837D0, 6);
|
||||
patch::Nop(0x5837C6, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
patch::SetRaw(0x5837FB, (void*)"\xD9\x15\x10\x83\xBA\x00", 6);
|
||||
patch::SetRaw(0x583805, (void*)"\xD9\x1D\x0C\x83\xBA\x00", 6);
|
||||
patch::SetRaw(0x58380D, (void*)"\xD9\x1D\x08\x83\xBA\x00", 6);
|
||||
patch::SetRaw(0x5837D6, (void*)"\xD9\x1D\x10\x83\xBA\x00", 6);
|
||||
patch::SetRaw(0x5837D0, (void*)"\xD9\x1D\x08\x83\xBA\x00", 6);
|
||||
patch::SetRaw(0x5837C6, (void*)"\xD9\x1D\x0C\x83\xBA\x00\xD9\xC0", 8);
|
||||
}
|
||||
}
|
||||
if (Widget::Checkbox(TEXT("Visual.NoWater"), &m_bNoWater))
|
||||
{
|
||||
if (m_bNoWater)
|
||||
|
@ -30,6 +30,7 @@ private:
|
||||
static inline bool m_bNoTextures;
|
||||
static inline bool m_bFullScreenMap;
|
||||
static inline bool m_bSquareRadar;
|
||||
static inline bool m_bNoRadarRot;
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user