Bug fixes, teleport with jetpack
This commit is contained in:
parent
2d7ffb089b
commit
7057088c1f
3
resource/CheatMenuSA/data/components.toml
Normal file
3
resource/CheatMenuSA/data/components.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Vehicle Tune Favoirites
|
||||||
|
##############################################################################
|
3
resource/CheatMenuSA/data/vehicles.toml
Normal file
3
resource/CheatMenuSA/data/vehicles.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Vehicle Favoirites
|
||||||
|
##############################################################################
|
@ -22,7 +22,7 @@ void Menu::Init()
|
|||||||
Overlay::bLocName = gConfig.Get("Overlay.ShowLocationName", false);
|
Overlay::bLocName = gConfig.Get("Overlay.ShowLocationName", false);
|
||||||
Overlay::bTransparent = gConfig.Get("Overlay.Transparent", false);
|
Overlay::bTransparent = gConfig.Get("Overlay.Transparent", false);
|
||||||
Overlay::bMemUsage = gConfig.Get("Overlay.ShowMemoryUsage", false);
|
Overlay::bMemUsage = gConfig.Get("Overlay.ShowMemoryUsage", false);
|
||||||
Overlay::bVehHealth = gConfig.Get("Overlay.ShowVehicleName", false);
|
Overlay::bVehHealth = gConfig.Get("Overlay.ShowVehicleHealth", false);
|
||||||
Overlay::bVehSpeed = gConfig.Get("Overlay.ShowVehicleSpeed", false);
|
Overlay::bVehSpeed = gConfig.Get("Overlay.ShowVehicleSpeed", false);
|
||||||
Overlay::mSelectedPos = (DisplayPos)gConfig.Get("Overlay.SelectedPosition", (int)DisplayPos::BOTTOM_RIGHT);
|
Overlay::mSelectedPos = (DisplayPos)gConfig.Get("Overlay.SelectedPosition", (int)DisplayPos::BOTTOM_RIGHT);
|
||||||
Overlay::fPosX = gConfig.Get("Overlay.PosX", 0);
|
Overlay::fPosX = gConfig.Get("Overlay.PosX", 0);
|
||||||
|
@ -41,7 +41,7 @@ void Teleport::Init()
|
|||||||
|
|
||||||
Events::processScriptsEvent += []
|
Events::processScriptsEvent += []
|
||||||
{
|
{
|
||||||
if ((TPMarker::m_bEnabled == true) && ((CTimer::m_snTimeInMilliseconds - TPMarker::m_nTimer) > 500))
|
if ((TPMarker::m_bEnabled == true) && ((CTimer::m_snTimeInMilliseconds - TPMarker::m_nTimer) > 50))
|
||||||
{
|
{
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
|
||||||
@ -63,6 +63,12 @@ void Teleport::Init()
|
|||||||
{
|
{
|
||||||
BY_GAME(player->Teleport(TPMarker::m_fPos, false), player->Teleport(TPMarker::m_fPos), player->Teleport(TPMarker::m_fPos));
|
BY_GAME(player->Teleport(TPMarker::m_fPos, false), player->Teleport(TPMarker::m_fPos), player->Teleport(TPMarker::m_fPos));
|
||||||
}
|
}
|
||||||
|
#ifdef GTASA
|
||||||
|
if (TPMarker::m_bJetpack)
|
||||||
|
{
|
||||||
|
Command<Commands::TASK_JETPACK>(CPools::GetPedRef(player));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TPMarker::m_bEnabled = false;
|
TPMarker::m_bEnabled = false;
|
||||||
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(player), false);
|
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(player), false);
|
||||||
@ -126,8 +132,10 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
{
|
{
|
||||||
CPlayerPed* pPlayer = FindPlayerPed();
|
CPlayerPed* pPlayer = FindPlayerPed();
|
||||||
CVehicle* pVeh = pPlayer->m_pVehicle;
|
CVehicle* pVeh = pPlayer->m_pVehicle;
|
||||||
|
int hplayer = CPools::GetPedRef(pPlayer);
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
TPMarker::m_bJetpack = Command<Commands::IS_PLAYER_USING_JETPACK>(0);
|
||||||
if (get_marker)
|
if (get_marker)
|
||||||
{
|
{
|
||||||
tRadarTrace targetBlip = CRadar::ms_RadarTrace[LOWORD(FrontEndMenuManager.m_nTargetBlipIndex)];
|
tRadarTrace targetBlip = CRadar::ms_RadarTrace[LOWORD(FrontEndMenuManager.m_nTargetBlipIndex)];
|
||||||
@ -147,6 +155,8 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
TheCamera.Fade(0, 0);
|
TheCamera.Fade(0, 0);
|
||||||
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(pPlayer), true);
|
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(pPlayer), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
@ -194,6 +204,11 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
{
|
{
|
||||||
pPlayer->Teleport(pos, false);
|
pPlayer->Teleport(pos, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TPMarker::m_bJetpack)
|
||||||
|
{
|
||||||
|
Command<Commands::TASK_JETPACK>(hplayer);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (pVeh && pPlayer->m_pVehicle)
|
if (pVeh && pPlayer->m_pVehicle)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ private:
|
|||||||
static inline bool m_bEnabled;
|
static inline bool m_bEnabled;
|
||||||
static inline CVector m_fPos = { -1, -1, -1 };
|
static inline CVector m_fPos = { -1, -1, -1 };
|
||||||
static inline uint m_nTimer;
|
static inline uint m_nTimer;
|
||||||
|
static inline bool m_bJetpack;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
Loading…
Reference in New Issue
Block a user