2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "pch.h"
|
|
|
|
|
|
|
|
class Teleport
|
|
|
|
{
|
|
|
|
private:
|
2021-06-18 12:49:11 -04:00
|
|
|
inline static bool m_bInsertCoord;
|
|
|
|
inline static bool m_bQuickTeleport;
|
|
|
|
inline static char m_nInputBuffer[INPUT_BUFFER_SIZE];
|
|
|
|
inline static SSearchData tp_data{"teleport"};
|
|
|
|
inline static char m_nLocationBuffer[INPUT_BUFFER_SIZE];
|
|
|
|
inline static uint m_nQuickTeleportTimer;
|
2021-08-01 21:41:48 -04:00
|
|
|
|
|
|
|
#ifdef GTASA
|
2021-06-18 12:49:11 -04:00
|
|
|
inline static CJson m_SpriteJson = CJson("radar sprite");
|
2021-08-01 21:41:48 -04:00
|
|
|
#endif
|
|
|
|
|
2021-06-19 09:00:13 -04:00
|
|
|
struct m_Teleport
|
2020-12-02 16:19:16 -05:00
|
|
|
{
|
2021-06-18 12:49:11 -04:00
|
|
|
inline static bool m_bEnabled;
|
|
|
|
inline static CVector m_fPos = {-1, -1, -1};
|
|
|
|
inline static uint m_nTimer;
|
2021-06-19 09:00:13 -04:00
|
|
|
};
|
2020-12-02 16:19:16 -05:00
|
|
|
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2021-08-01 21:41:48 -04:00
|
|
|
#ifdef GTASA
|
2020-12-09 08:15:50 -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-01 21:41:48 -04:00
|
|
|
#endif
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
protected:
|
|
|
|
Teleport();
|
|
|
|
public:
|
2021-02-24 16:54:45 -05:00
|
|
|
static void Draw();
|
|
|
|
static void TeleportPlayer(bool get_marker = false, CVector pos = CVector(0, 0, 0), short interior_id = 0);
|
2021-06-15 09:30:48 -04:00
|
|
|
static void TeleportToLocation(std::string& rootkey, std::string& bLocName, std::string& loc);
|
2020-12-02 16:19:16 -05:00
|
|
|
static void RemoveTeleportEntry(std::string& rootkey, std::string& key, std::string& val);
|
2021-06-18 12:49:11 -04:00
|
|
|
};
|