mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 09:18:12 +00:00
more script stuff
This commit is contained in:
@ -100,7 +100,7 @@ void WeaponCheat()
|
||||
void HealthCheat()
|
||||
{
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT3"), true);
|
||||
FindPlayerPed()->m_fHealth = 100.0f;
|
||||
FindPlayerPed()->m_fHealth = CWorld::Players[0].m_nMaxHealth;
|
||||
if (FindPlayerVehicle()) {
|
||||
FindPlayerVehicle()->m_fHealth = 1000.0f;
|
||||
if (FindPlayerVehicle()->m_vehType == VEHICLE_TYPE_CAR)
|
||||
@ -224,7 +224,7 @@ void MoneyCheat()
|
||||
void ArmourCheat()
|
||||
{
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT4"), true);
|
||||
FindPlayerPed()->m_fArmour = 100.0f;
|
||||
FindPlayerPed()->m_fArmour = CWorld::Players[0].m_nMaxArmour;
|
||||
}
|
||||
|
||||
void WantedLevelUpCheat()
|
||||
|
@ -140,6 +140,7 @@ CPlayerInfo::Clear(void)
|
||||
m_nUpsideDownCounter = 0;
|
||||
m_bInfiniteSprint = false;
|
||||
m_bFastReload = false;
|
||||
m_nMaxHealth = m_nMaxArmour = 100;
|
||||
m_bGetOutOfJailFree = false;
|
||||
m_bGetOutOfHospitalFree = false;
|
||||
m_nPreviousTimeRewardedForExplosion = 0;
|
||||
|
@ -52,6 +52,9 @@ public:
|
||||
int32 field_272;
|
||||
bool m_bInfiniteSprint;
|
||||
bool m_bFastReload;
|
||||
bool m_bFireproof;
|
||||
uint8 m_nMaxHealth;
|
||||
uint8 m_nMaxArmour;
|
||||
bool m_bGetOutOfJailFree;
|
||||
bool m_bGetOutOfHospitalFree;
|
||||
char m_aSkinName[32];
|
||||
|
@ -61,6 +61,7 @@ int32 CStats::HighestScores[CStats::TOTAL_HIGHEST_SCORES];
|
||||
int32 CStats::Sprayings;
|
||||
float CStats::AutoPaintingBudget;
|
||||
int32 CStats::NoMoreHurricanes;
|
||||
float CStats::FashionBudget;
|
||||
|
||||
void CStats::Init()
|
||||
{
|
||||
@ -208,6 +209,19 @@ void CStats::SetTotalNumberMissions(int32 total)
|
||||
TotalNumberMissions = total;
|
||||
}
|
||||
|
||||
float CStats::GetPercentageProgress()
|
||||
{
|
||||
float p;
|
||||
if (TotalProgressInGame == 0.0f)
|
||||
p = 0.0f;
|
||||
else if (CGame::nastyGame)
|
||||
p = 100.0f * ProgressMade / TotalProgressInGame;
|
||||
else
|
||||
p = 100.0f * ProgressMade / (TotalProgressInGame - 1);
|
||||
|
||||
return Min(100.0f, p);
|
||||
}
|
||||
|
||||
wchar *CStats::FindCriminalRatingString()
|
||||
{
|
||||
int rating = FindCriminalRatingNumber();
|
||||
@ -249,6 +263,11 @@ int32 CStats::FindCriminalRatingNumber()
|
||||
return rating;
|
||||
}
|
||||
|
||||
void CStats::MoneySpentOnFashion(int32 money)
|
||||
{
|
||||
FashionBudget += money;
|
||||
}
|
||||
|
||||
void CStats::SaveStats(uint8 *buf, uint32 *size)
|
||||
{
|
||||
CheckPointReachedSuccessfully();
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
static int32 Sprayings;
|
||||
static float AutoPaintingBudget;
|
||||
static int32 NoMoreHurricanes;
|
||||
static float FashionBudget;
|
||||
|
||||
public:
|
||||
static void Init(void);
|
||||
@ -88,6 +89,9 @@ public:
|
||||
static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; };
|
||||
static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; };
|
||||
static int32 FindCriminalRatingNumber();
|
||||
static float GetPercentageProgress();
|
||||
static void SaveStats(uint8 *buf, uint32 *size);
|
||||
static void LoadStats(uint8 *buf, uint32 size);
|
||||
|
||||
static void MoneySpentOnFashion(int32);
|
||||
};
|
||||
|
Reference in New Issue
Block a user