-
Notifications
You must be signed in to change notification settings - Fork 1
/
Agentchanger.h
95 lines (87 loc) · 4.84 KB
/
Agentchanger.h
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
92
93
94
95
#include "Thanatos.h"
#include "Inih/INIReader.h"
#include "SDK/ItemDefinitionIndex.h"
#define TEAM_TERRORIST 2
#define TEAM_ANTI_TERRORIST 3
/*constexpr std::array models
{
"models/player/custom_player/legacy/ctm_fbi_variantb.mdl",
"models/player/custom_player/legacy/ctm_fbi_variantf.mdl",
"models/player/custom_player/legacy/ctm_fbi_variantg.mdl",
"models/player/custom_player/legacy/ctm_fbi_varianth.mdl",
"models/player/custom_player/legacy/ctm_sas_variantf.mdl",
"models/player/custom_player/legacy/ctm_st6_variante.mdl",
"models/player/custom_player/legacy/ctm_st6_variantg.mdl",
"models/player/custom_player/legacy/ctm_st6_varianti.mdl",
"models/player/custom_player/legacy/ctm_st6_variantk.mdl",
"models/player/custom_player/legacy/ctm_st6_variantm.mdl",
"models/player/custom_player/legacy/tm_balkan_variantf.mdl",
"models/player/custom_player/legacy/tm_balkan_variantg.mdl",
"models/player/custom_player/legacy/tm_balkan_varianth.mdl",
"models/player/custom_player/legacy/tm_balkan_varianti.mdl",
"models/player/custom_player/legacy/tm_balkan_variantj.mdl",
"models/player/custom_player/legacy/tm_leet_variantf.mdl",
"models/player/custom_player/legacy/tm_leet_variantg.mdl",
"models/player/custom_player/legacy/tm_leet_varianth.mdl",
"models/player/custom_player/legacy/tm_leet_varianti.mdl",
"models/player/custom_player/legacy/tm_phoenix_variantf.mdl",
"models/player/custom_player/legacy/tm_phoenix_variantg.mdl",
"models/player/custom_player/legacy/tm_phoenix_varianth.mdl",
"models/player/custom_player/legacy/tm_pirate.mdl",
"models/player/custom_player/legacy/tm_pirate_varianta.mdl",
"models/player/custom_player/legacy/tm_pirate_variantb.mdl",
"models/player/custom_player/legacy/tm_pirate_variantc.mdl",
"models/player/custom_player/legacy/tm_pirate_variantd.mdl",
"models/player/custom_player/legacy/tm_anarchist.mdl",
"models/player/custom_player/legacy/tm_anarchist_varianta.mdl",
"models/player/custom_player/legacy/tm_anarchist_variantb.mdl",
"models/player/custom_player/legacy/tm_anarchist_variantc.mdl",
"models/player/custom_player/legacy/tm_anarchist_variantd.mdl",
"models/player/custom_player/legacy/tm_balkan_varianta.mdl",
"models/player/custom_player/legacy/tm_balkan_variantb.mdl",
"models/player/custom_player/legacy/tm_balkan_variantc.mdl",
"models/player/custom_player/legacy/tm_balkan_variantd.mdl",
"models/player/custom_player/legacy/tm_balkan_variante.mdl",
"models/player/custom_player/legacy/tm_jumpsuit_varianta.mdl",
"models/player/custom_player/legacy/tm_jumpsuit_variantb.mdl",
"models/player/custom_player/legacy/tm_jumpsuit_variantc.mdl",
"models/player/custom_player/legacy/tm_phoenix_varianti.mdl",
"models/player/custom_player/legacy/ctm_st6_variantj.mdl",
"models/player/custom_player/legacy/ctm_st6_variantl.mdl",
"models/player/custom_player/legacy/tm_balkan_variantk.mdl",
"models/player/custom_player/legacy/tm_balkan_variantl.mdl",
"models/player/custom_player/legacy/ctm_swat_variante.mdl",
"models/player/custom_player/legacy/ctm_swat_variantf.mdl",
"models/player/custom_player/legacy/ctm_swat_variantg.mdl",
"models/player/custom_player/legacy/ctm_swat_varianth.mdl",
"models/player/custom_player/legacy/ctm_swat_varianti.mdl",
"models/player/custom_player/legacy/ctm_swat_variantj.mdl",
"models/player/custom_player/legacy/tm_professional_varf.mdl",
"models/player/custom_player/legacy/tm_professional_varf1.mdl",
"models/player/custom_player/legacy/tm_professional_varf2.mdl",
"models/player/custom_player/legacy/tm_professional_varf3.mdl",
"models/player/custom_player/legacy/tm_professional_varf4.mdl",
"models/player/custom_player/legacy/tm_professional_varg.mdl",
"models/player/custom_player/legacy/tm_professional_varh.mdl",
"models/player/custom_player/legacy/tm_professional_vari.mdl",
"models/player/custom_player/legacy/tm_professional_varj.mdl"
};*/
extern Thanatos thanatos;
void Thanatos::AgentChanger()
{
if (!localPlayer || !EngineClient->isInGame()) return;
int agentIndex;
int* modelIndex = (int*)(localPlayer + netvars::m_nModelIndex);
switch (localPlayer->GetTeam())
{
case TEAM_TERRORIST:
agentIndex = ModelInfoClient->GetModelIndex("models/player/custom_player/legacy/tm_professional_varf4.mdl");
break;
case TEAM_ANTI_TERRORIST:
agentIndex = ModelInfoClient->GetModelIndex("models/player/custom_player/legacy/ctm_st6_variantm.mdl");
break;
default:
break;
}
if (agentIndex) *modelIndex = agentIndex;
}