2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2021-10-25 10:03:27 -04:00
|
|
|
#include "pch.h"
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
class Teleport
|
|
|
|
{
|
|
|
|
private:
|
2022-01-07 03:18:00 -05:00
|
|
|
static inline bool m_bInsertCoord;
|
|
|
|
static inline bool m_bQuickTeleport;
|
|
|
|
static inline char m_nInputBuffer[INPUT_BUFFER_SIZE];
|
2022-06-15 06:45:43 -04:00
|
|
|
static inline ResourceStore m_tpData{ "locations", eResourceType::TYPE_TEXT };
|
2022-01-07 03:18:00 -05:00
|
|
|
static inline char m_nLocationBuffer[INPUT_BUFFER_SIZE];
|
|
|
|
static inline uint m_nQuickTeleportTimer;
|
2021-08-01 21:41:48 -04:00
|
|
|
|
2021-08-06 11:53:18 -04:00
|
|
|
#ifdef GTASA
|
2022-06-15 06:45:43 -04:00
|
|
|
static inline DataStore m_SpriteData {"sprites"};
|
2021-08-06 11:53:18 -04:00
|
|
|
#endif
|
2021-08-01 21:41:48 -04:00
|
|
|
|
2022-06-26 08:21:28 -04:00
|
|
|
struct QuickTP
|
2022-01-07 03:18:00 -05:00
|
|
|
{
|
|
|
|
static inline bool m_bEnabled;
|
|
|
|
static inline CVector m_fPos = { -1, -1, -1 };
|
|
|
|
static inline uint m_nTimer;
|
|
|
|
};
|
2021-10-25 10:03:27 -04:00
|
|
|
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2021-08-06 11:53:18 -04:00
|
|
|
#ifdef GTASA
|
2022-01-07 03:18:00 -05:00
|
|
|
/*
|
|
|
|
Generates radar sprite coordinates on the fly.
|
|
|
|
Shouldn't get saved in 'teleport.json', needs to be cleared at game shutdown.
|
|
|
|
*/
|
|
|
|
static void FetchRadarSpriteData();
|
2021-08-06 11:53:18 -04:00
|
|
|
#endif
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2022-01-07 03:18:00 -05:00
|
|
|
static void TeleportToLocation(std::string& rootkey, std::string& bLocName, std::string& loc);
|
|
|
|
static void RemoveTeleportEntry(std::string& rootkey, std::string& key, std::string& val);
|
2022-01-13 08:57:08 -05:00
|
|
|
|
|
|
|
public:
|
2022-02-21 03:33:57 -05:00
|
|
|
Teleport() = delete;
|
|
|
|
Teleport(const Teleport&) = delete;
|
2022-01-13 08:57:08 -05:00
|
|
|
|
2022-02-21 03:33:57 -05:00
|
|
|
static void Init();
|
2022-01-13 08:57:08 -05:00
|
|
|
static void TeleportPlayer(bool get_marker = false, CVector pos = CVector(0, 0, 0), int interior_id = 0);
|
2022-01-20 02:04:45 -05:00
|
|
|
static void ShowPage();
|
2021-06-18 12:49:11 -04:00
|
|
|
};
|