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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
/*
gokz-profile Plugin Include
Website: https://bitbucket.org/kztimerglobalteam/gokz
*/
#if defined _gokz_profile_included_
#endinput
#endif
#define _gokz_profile_included_
// =====[ RANKS ]=====
#define RANK_COUNT 23
stock int gI_rankThreshold[MODE_COUNT][RANK_COUNT] = {
{
0,
1,
500,
1000,
2000,
5000,
10000,
20000,
30000,
40000,
60000,
70000,
80000,
100000,
120000,
140000,
160000,
180000,
200000,
250000,
300000,
400000,
600000
},
{
0,
1,
500,
1000,
2000,
5000,
10000,
20000,
30000,
40000,
60000,
70000,
80000,
100000,
120000,
150000,
200000,
230000,
250000,
300000,
400000,
500000,
800000
},
{
0,
1,
500,
1000,
2000,
5000,
10000,
20000,
30000,
40000,
60000,
70000,
80000,
100000,
120000,
150000,
200000,
230000,
250000,
400000,
600000,
800000,
1000000
},
};
stock char gC_rankName[RANK_COUNT][] = {
"New",
"Beginner-",
"Beginner",
"Beginner+",
"Amateur-",
"Amateur",
"Amateur+",
"Casual-",
"Casual",
"Casual+",
"Regular-",
"Regular",
"Regular+",
"Skilled-",
"Skilled",
"Skilled+",
"Expert-",
"Expert",
"Expert+",
"Semipro",
"Pro",
"Master",
"Legend"
};
stock char gC_rankColor[RANK_COUNT][] = {
"{grey}",
"{default}",
"{default}",
"{default}",
"{blue}",
"{blue}",
"{blue}",
"{lightgreen}",
"{lightgreen}",
"{lightgreen}",
"{green}",
"{green}",
"{green}",
"{purple}",
"{purple}",
"{purple}",
"{orchid}",
"{orchid}",
"{orchid}",
"{lightred}",
"{lightred}",
"{red}",
"{gold}"
};
// =====[ ENUMS ]=====
enum ProfileOption:
{
PROFILEOPTION_INVALID = -1,
ProfileOption_ShowRankChat,
ProfileOption_ShowRankClanTag,
ProfileOption_TagType,
PROFILEOPTION_COUNT
};
enum
{
ProfileOptionBool_Disabled = 0,
ProfileOptionBool_Enabled,
PROFILEOPTIONBOOL_COUNT
};
enum
{
ProfileTagType_Rank = 0,
ProfileTagType_Admin,
ProfileTagType_VIP,
PROFILETAGTYPE_COUNT
};
// =====[ CONSTANTS ]=====
stock char gC_ProfileOptionNames[PROFILEOPTION_COUNT][] =
{
"GOKZ Profile - Show Rank Chat",
"GOKZ Profile - Show Rank Clan",
"GOKZ Profile - Tag Type"
};
stock char gC_ProfileOptionDescriptions[PROFILEOPTION_COUNT][] =
{
"Show Rank Tag in Chat - 0 = Disabled, 1 = Enabled",
"Show Rank in Clan - 0 = Disabled, 1 = Enabled",
"Type of Tag to Show - 0 = Rank, 1 = Admin, 2 = VIP"
};
stock char gC_ProfileOptionPhrases[PROFILEOPTION_COUNT][] =
{
"Options Menu - Show Rank Chat",
"Options Menu - Show Rank Clan",
"Options Menu - Tag Type",
};
stock char gC_ProfileBoolPhrases[PROFILEOPTIONBOOL_COUNT][] =
{
"Options Menu - Disabled",
"Options Menu - Enabled"
};
stock char gC_ProfileTagTypePhrases[PROFILETAGTYPE_COUNT][] =
{
"Options Menu - Tag Rank",
"Options Menu - Tag Admin",
"Options Menu - Tag VIP"
};
stock int gI_ProfileOptionCounts[PROFILEOPTION_COUNT] =
{
PROFILEOPTIONBOOL_COUNT,
PROFILEOPTIONBOOL_COUNT,
PROFILETAGTYPE_COUNT
};
stock int gI_ProfileOptionDefaults[PROFILEOPTION_COUNT] =
{
ProfileOptionBool_Enabled,
ProfileOptionBool_Enabled,
ProfileTagType_Rank
};
#define PROFILE_OPTION_CATEGORY "Profile"
#define TAG_COLOR_ADMIN "{red}"
#define TAG_COLOR_VIP "{purple}"
// =====[ FORWARDS ]=====
/**
* Called when the rank of a player is updated.
*
* @param client Client index.
* @param mode Game mode.
* @param rank The new rank.
*/
forward void GOKZ_PF_OnRankUpdated(int client, int mode, int rank);
// =====[ NATIVES ]=====
/**
* Gets whether a mode is loaded.
*
* @param client Client.
* @param tag Mode.
* @returns Integer representing the player rank.
*/
native int GOKZ_PF_GetRank(int client, int mode);
// =====[ DEPENDENCY ]=====
public SharedPlugin __pl_gokz_profile =
{
name = "gokz-profile",
file = "gokz-profile.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_PLUGIN
public void __pl_gokz_profile_SetNTVOptional()
{
MarkNativeAsOptional("GOKZ_PF_GetRank");
}
#endif
|