-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnatives.h
More file actions
65 lines (50 loc) · 1.84 KB
/
Copy pathnatives.h
File metadata and controls
65 lines (50 loc) · 1.84 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
#ifndef _INCLUDE_SOURCEMOD_NATIVES_PROPER_H_
#define _INCLUDE_SOURCEMOD_NATIVES_PROPER_H_
#include "smsdk_ext.h"
#include "callback_manager.h"
#include "hook_types.h"
#include "arg_types.h"
#include "func_types.h"
enum ValveLibrary {
ValveLibrary_Server,
ValveLibrary_Engine,
ValveLibrary_Vphysics,
ValveLibrary_LibSteam,
ValveLibrary_LibSteamAPI
};
enum MasterhookDataType {
MhDataType_Unknown, // Type is not a default type.
MhDataType_Void, // void
MhDataType_Bool, // bool
MhDataType_Char, // char
MhDataType_Char_Ptr, // char*
MhDataType_Float, // float
MhDataType_Float_Ptr, // float*
MhDataType_Int8, // byte
MhDataType_Int8_Ptr, // byte*
MhDataType_Int16, // short
MhDataType_Int16_Ptr, // short*
MhDataType_Int32, // int
MhDataType_Int32_Ptr, // int*
MhDataType_Int64, // int64
MhDataType_Int64_Ptr, // int64*
MhDataType_CBaseEntity, // CBaseEntity* (entity) or CBasePlayer* (player)
MhDataType_Edict, // Edict (networked entity with index)
MhDataType_CTakeDamageInfo, // CTakeDamageInfo (Damage Info Class)
MhDataType_Vector, // Vector
MhDataType_QAngle // QAngle
};
cell_t Native_Mh_HookFunction(IPluginContext *pContext, const cell_t *params);
cell_t Native_Mh_UnhookFunction(IPluginContext *pContext, const cell_t *params);
cell_t Native_Mh_SetReturnValue(IPluginContext *pContext, const cell_t *params);
cell_t Native_Mh_CallOriginal(IPluginContext *pContext, const cell_t *params);
cell_t Native_Mh_Call(IPluginContext *pContext, const cell_t *params);
const sp_nativeinfo_t g_Natives[] = {
{"Mh_HookFunction", Native_Mh_HookFunction},
{"Mh_UnhookFunction", Native_Mh_UnhookFunction},
{"Mh_SetReturnValue", Native_Mh_SetReturnValue},
{"MH_CallOriginal", Native_Mh_CallOriginal},
{"Mh_Call", Native_Mh_Call},
{NULL, NULL},
};
#endif // _INCLUDE_SOURCEMOD_NATIVES_PROPER_H_