-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrage_sdk.hpp
More file actions
91 lines (77 loc) · 2.71 KB
/
Copy pathrage_sdk.hpp
File metadata and controls
91 lines (77 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#pragma once
#include <cstdint>
#include <cstring>
#include <string>
#include <vector>
#include <map>
#include <functional>
#include <locale>
#include <codecvt>
#include "types.hpp"
#include "objects/IEntity.hpp"
#include "objects/IPlayer.hpp"
#include "objects/IVehicle.hpp"
#include "objects/IObject.hpp"
#include "objects/IPickup.hpp"
#include "objects/IBlip.hpp"
#include "objects/ICheckpoint.hpp"
#include "objects/IMarker.hpp"
#include "objects/IColshape.hpp"
#include "objects/ITextLabel.hpp"
#include "objects/IDummyEntity.hpp"
#include "handlers/IEntityHandler.hpp"
#include "handlers/IPlayerHandler.hpp"
#include "handlers/IVehicleHandler.hpp"
#include "handlers/IColshapeHandler.hpp"
#include "handlers/ICheckpointHandler.hpp"
#include "handlers/IBlipHandler.hpp"
#include "handlers/ITickHandler.hpp"
#include "handlers/ILocalEventHandler.hpp"
#include "handlers/IConnectionHandler.hpp"
#include "handlers/IServerHandler.hpp"
#ifdef _WIN32
#define EXTERN extern "C" __declspec(dllexport)
#else
#define EXTERN extern "C"
#endif
namespace rage
{
//rage::IEntityHandler, rage::IPlayerHandler, rage::IVehicleHandler, rage::IColshapeHandler, rage::ICheckpointHandler, rage::IBlipHandler,
// rage::ITickHandler, rage::IServerHandler, rage::ILocalEventHandler, rage::IConnectionHandler, rage::IRpcHandler;
class IEventHandler
{
public:
virtual IEntityHandler* GetEntityHandler() { return nullptr; } // 0x0
virtual IPlayerHandler* GetPlayerHandler() { return nullptr; } // 0x8
virtual IVehicleHandler* GetVehicleHandler() { return nullptr; } // 0x10
virtual IColshapeHandler* GetColshapeHandler() { return nullptr; } // 0x18
virtual ICheckpointHandler* GetCheckpointHandler() { return nullptr; } // 0x20
virtual IBlipHandler* GetBlipHandler() { return nullptr; } // 0x28
virtual __int64* padding_01() { return nullptr; } // 0x30
virtual ITickHandler* GetTickHandler() { return nullptr; } // 0x38
virtual ILocalEventHandler* GetLocalEventHandler() { return nullptr; } // 0x40
virtual IConnectionHandler* GetConnectionHandler() { return nullptr; } // 0x48
virtual __int64* GetDebugHandler() { return nullptr; } // 0x50 <- cant find class for it
virtual IServerHandler* GetServerHandler() { return nullptr; } // 0x58
virtual __int64 GetRPCHandler() { return 2; } // 0x60
};
class IMultiplayer
{
public:
static constexpr uint32_t SDK_VERSION = 6;
virtual void SetEventHandler(IEventHandler* event_handler) = 0;
static IMultiplayer& Instance()
{
return *_instance();
}
static void SetInstance(IMultiplayer* server) { _instance() = server; }
protected:
virtual ~IMultiplayer() = default;
private:
static IMultiplayer*& _instance()
{
static IMultiplayer* instance = nullptr;
return instance;
}
};
}