summaryrefslogtreecommitdiff
path: root/sourcemod/scripting/gokz-core/forwards.sp
blob: efb064fba8838623e15565609aeb7ddccefa438a (plain)
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
static GlobalForward H_OnOptionsLoaded;
static GlobalForward H_OnOptionChanged;
static GlobalForward H_OnTimerStart;
static GlobalForward H_OnTimerStart_Post;
static GlobalForward H_OnTimerEnd;
static GlobalForward H_OnTimerEnd_Post;
static GlobalForward H_OnTimerEndMessage;
static GlobalForward H_OnTimerStopped;
static GlobalForward H_OnPause;
static GlobalForward H_OnPause_Post;
static GlobalForward H_OnResume;
static GlobalForward H_OnResume_Post;
static GlobalForward H_OnMakeCheckpoint;
static GlobalForward H_OnMakeCheckpoint_Post;
static GlobalForward H_OnTeleportToCheckpoint;
static GlobalForward H_OnTeleportToCheckpoint_Post;
static GlobalForward H_OnTeleport;
static GlobalForward H_OnPrevCheckpoint;
static GlobalForward H_OnPrevCheckpoint_Post;
static GlobalForward H_OnNextCheckpoint;
static GlobalForward H_OnNextCheckpoint_Post;
static GlobalForward H_OnTeleportToStart;
static GlobalForward H_OnTeleportToStart_Post;
static GlobalForward H_OnTeleportToEnd;
static GlobalForward H_OnTeleportToEnd_Post;
static GlobalForward H_OnUndoTeleport;
static GlobalForward H_OnUndoTeleport_Post;
static GlobalForward H_OnCountedTeleport_Post;
static GlobalForward H_OnStartPositionSet_Post;
static GlobalForward H_OnJumpValidated;
static GlobalForward H_OnJumpInvalidated;
static GlobalForward H_OnJoinTeam;
static GlobalForward H_OnFirstSpawn;
static GlobalForward H_OnModeLoaded;
static GlobalForward H_OnModeUnloaded;
static GlobalForward H_OnTimerNativeCalledExternally;
static GlobalForward H_OnOptionsMenuCreated;
static GlobalForward H_OnOptionsMenuReady;
static GlobalForward H_OnCourseRegistered;
static GlobalForward H_OnRunInvalidated;
static GlobalForward H_OnEmitSoundToClient;

void CreateGlobalForwards()
{
	H_OnOptionsLoaded = new GlobalForward("GOKZ_OnOptionsLoaded", ET_Ignore, Param_Cell);
	H_OnOptionChanged = new GlobalForward("GOKZ_OnOptionChanged", ET_Ignore, Param_Cell, Param_String, Param_Cell);
	H_OnTimerStart = new GlobalForward("GOKZ_OnTimerStart", ET_Hook, Param_Cell, Param_Cell);
	H_OnTimerStart_Post = new GlobalForward("GOKZ_OnTimerStart_Post", ET_Ignore, Param_Cell, Param_Cell);
	H_OnTimerEnd = new GlobalForward("GOKZ_OnTimerEnd", ET_Hook, Param_Cell, Param_Cell, Param_Float, Param_Cell);
	H_OnTimerEnd_Post = new GlobalForward("GOKZ_OnTimerEnd_Post", ET_Ignore, Param_Cell, Param_Cell, Param_Float, Param_Cell);
	H_OnTimerEndMessage = new GlobalForward("GOKZ_OnTimerEndMessage", ET_Hook, Param_Cell, Param_Cell, Param_Float, Param_Cell);
	H_OnTimerStopped = new GlobalForward("GOKZ_OnTimerStopped", ET_Ignore, Param_Cell);
	H_OnPause = new GlobalForward("GOKZ_OnPause", ET_Hook, Param_Cell);
	H_OnPause_Post = new GlobalForward("GOKZ_OnPause_Post", ET_Ignore, Param_Cell);
	H_OnResume = new GlobalForward("GOKZ_OnResume", ET_Hook, Param_Cell);
	H_OnResume_Post = new GlobalForward("GOKZ_OnResume_Post", ET_Ignore, Param_Cell);
	H_OnMakeCheckpoint = new GlobalForward("GOKZ_OnMakeCheckpoint", ET_Hook, Param_Cell);
	H_OnMakeCheckpoint_Post = new GlobalForward("GOKZ_OnMakeCheckpoint_Post", ET_Ignore, Param_Cell);
	H_OnTeleportToCheckpoint = new GlobalForward("GOKZ_OnTeleportToCheckpoint", ET_Hook, Param_Cell);
	H_OnTeleportToCheckpoint_Post = new GlobalForward("GOKZ_OnTeleportToCheckpoint_Post", ET_Ignore, Param_Cell);
	H_OnTeleport = new GlobalForward("GOKZ_OnTeleport", ET_Hook, Param_Cell);
	H_OnPrevCheckpoint = new GlobalForward("GOKZ_OnPrevCheckpoint", ET_Hook, Param_Cell);
	H_OnPrevCheckpoint_Post = new GlobalForward("GOKZ_OnPrevCheckpoint_Post", ET_Ignore, Param_Cell);
	H_OnNextCheckpoint = new GlobalForward("GOKZ_OnNextCheckpoint", ET_Hook, Param_Cell);
	H_OnNextCheckpoint_Post = new GlobalForward("GOKZ_OnNextCheckpoint_Post", ET_Ignore, Param_Cell);
	H_OnTeleportToStart = new GlobalForward("GOKZ_OnTeleportToStart", ET_Hook, Param_Cell, Param_Cell);
	H_OnTeleportToStart_Post = new GlobalForward("GOKZ_OnTeleportToStart_Post", ET_Ignore, Param_Cell, Param_Cell);
	H_OnTeleportToEnd = new GlobalForward("GOKZ_OnTeleportToEnd", ET_Hook, Param_Cell, Param_Cell);
	H_OnTeleportToEnd_Post = new GlobalForward("GOKZ_OnTeleportToEnd_Post", ET_Ignore, Param_Cell, Param_Cell);
	H_OnUndoTeleport = new GlobalForward("GOKZ_OnUndoTeleport", ET_Hook, Param_Cell);
	H_OnUndoTeleport_Post = new GlobalForward("GOKZ_OnUndoTeleport_Post", ET_Ignore, Param_Cell);
	H_OnStartPositionSet_Post = new GlobalForward("GOKZ_OnStartPositionSet_Post", ET_Ignore, Param_Cell, Param_Cell, Param_Array, Param_Array);
	H_OnCountedTeleport_Post = new GlobalForward("GOKZ_OnCountedTeleport_Post", ET_Ignore, Param_Cell);
	H_OnJumpValidated = new GlobalForward("GOKZ_OnJumpValidated", ET_Ignore, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
	H_OnJumpInvalidated = new GlobalForward("GOKZ_OnJumpInvalidated", ET_Ignore, Param_Cell);
	H_OnJoinTeam = new GlobalForward("GOKZ_OnJoinTeam", ET_Ignore, Param_Cell, Param_Cell);
	H_OnFirstSpawn = new GlobalForward("GOKZ_OnFirstSpawn", ET_Ignore, Param_Cell);
	H_OnModeLoaded = new GlobalForward("GOKZ_OnModeLoaded", ET_Ignore, Param_Cell);
	H_OnModeUnloaded = new GlobalForward("GOKZ_OnModeUnloaded", ET_Ignore, Param_Cell);
	H_OnTimerNativeCalledExternally = new GlobalForward("GOKZ_OnTimerNativeCalledExternally", ET_Event, Param_Cell, Param_Cell);
	H_OnOptionsMenuCreated = new GlobalForward("GOKZ_OnOptionsMenuCreated", ET_Ignore, Param_Cell);
	H_OnOptionsMenuReady = new GlobalForward("GOKZ_OnOptionsMenuReady", ET_Ignore, Param_Cell);
	H_OnCourseRegistered = new GlobalForward("GOKZ_OnCourseRegistered", ET_Ignore, Param_Cell);
	H_OnRunInvalidated = new GlobalForward("GOKZ_OnRunInvalidated", ET_Ignore, Param_Cell);
	H_OnEmitSoundToClient = new GlobalForward("GOKZ_OnEmitSoundToClient", ET_Hook, Param_Cell, Param_String, Param_FloatByRef, Param_String);
}

void Call_GOKZ_OnOptionsLoaded(int client)
{
	Call_StartForward(H_OnOptionsLoaded);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnOptionChanged(int client, const char[] option, int optionValue)
{
	Call_StartForward(H_OnOptionChanged);
	Call_PushCell(client);
	Call_PushString(option);
	Call_PushCell(optionValue);
	Call_Finish();
}

void Call_GOKZ_OnTimerStart(int client, int course, Action &result)
{
	Call_StartForward(H_OnTimerStart);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish(result);
}

void Call_GOKZ_OnTimerStart_Post(int client, int course)
{
	Call_StartForward(H_OnTimerStart_Post);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish();
}

void Call_GOKZ_OnTimerEnd(int client, int course, float time, int teleportsUsed, Action &result)
{
	Call_StartForward(H_OnTimerEnd);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_PushFloat(time);
	Call_PushCell(teleportsUsed);
	Call_Finish(result);
}

void Call_GOKZ_OnTimerEnd_Post(int client, int course, float time, int teleportsUsed)
{
	Call_StartForward(H_OnTimerEnd_Post);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_PushFloat(time);
	Call_PushCell(teleportsUsed);
	Call_Finish();
}

void Call_GOKZ_OnTimerEndMessage(int client, int course, float time, int teleportsUsed, Action &result)
{
	Call_StartForward(H_OnTimerEndMessage);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_PushFloat(time);
	Call_PushCell(teleportsUsed);
	Call_Finish(result);
}

void Call_GOKZ_OnTimerStopped(int client)
{
	Call_StartForward(H_OnTimerStopped);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnPause(int client, Action &result)
{
	Call_StartForward(H_OnPause);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnPause_Post(int client)
{
	Call_StartForward(H_OnPause_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnResume(int client, Action &result)
{
	Call_StartForward(H_OnResume);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnResume_Post(int client)
{
	Call_StartForward(H_OnResume_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnMakeCheckpoint(int client, Action &result)
{
	Call_StartForward(H_OnMakeCheckpoint);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnMakeCheckpoint_Post(int client)
{
	Call_StartForward(H_OnMakeCheckpoint_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnTeleportToCheckpoint(int client, Action &result)
{
	Call_StartForward(H_OnTeleportToCheckpoint);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnTeleportToCheckpoint_Post(int client)
{
	Call_StartForward(H_OnTeleportToCheckpoint_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnTeleport(int client)
{
	Call_StartForward(H_OnTeleport);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnPrevCheckpoint(int client, Action &result)
{
	Call_StartForward(H_OnPrevCheckpoint);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnPrevCheckpoint_Post(int client)
{
	Call_StartForward(H_OnPrevCheckpoint_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnNextCheckpoint(int client, Action &result)
{
	Call_StartForward(H_OnNextCheckpoint);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnNextCheckpoint_Post(int client)
{
	Call_StartForward(H_OnNextCheckpoint_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnTeleportToStart(int client, int course, Action &result)
{
	Call_StartForward(H_OnTeleportToStart);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish(result);
}

void Call_GOKZ_OnTeleportToStart_Post(int client, int course)
{
	Call_StartForward(H_OnTeleportToStart_Post);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish();
}

void Call_GOKZ_OnTeleportToEnd(int client, int course, Action &result)
{
	Call_StartForward(H_OnTeleportToEnd);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish(result);
}

void Call_GOKZ_OnTeleportToEnd_Post(int client, int course)
{
	Call_StartForward(H_OnTeleportToEnd_Post);
	Call_PushCell(client);
	Call_PushCell(course);
	Call_Finish();
}

void Call_GOKZ_OnUndoTeleport(int client, Action &result)
{
	Call_StartForward(H_OnUndoTeleport);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnUndoTeleport_Post(int client)
{
	Call_StartForward(H_OnUndoTeleport_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnCountedTeleport_Post(int client)
{
	Call_StartForward(H_OnCountedTeleport_Post);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnStartPositionSet_Post(int client, StartPositionType type, const float origin[3], const float angles[3])
{
	Call_StartForward(H_OnStartPositionSet_Post);
	Call_PushCell(client);
	Call_PushCell(type);
	Call_PushArray(origin, 3);
	Call_PushArray(angles, 3);
	Call_Finish();
}

void Call_GOKZ_OnJumpValidated(int client, bool jumped, bool ladderJump, bool jumpbug)
{
	Call_StartForward(H_OnJumpValidated);
	Call_PushCell(client);
	Call_PushCell(jumped);
	Call_PushCell(ladderJump);
	Call_PushCell(jumpbug);
	Call_Finish();
}

void Call_GOKZ_OnJumpInvalidated(int client)
{
	Call_StartForward(H_OnJumpInvalidated);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnJoinTeam(int client, int team)
{
	Call_StartForward(H_OnJoinTeam);
	Call_PushCell(client);
	Call_PushCell(team);
	Call_Finish();
}

void Call_GOKZ_OnFirstSpawn(int client)
{
	Call_StartForward(H_OnFirstSpawn);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnModeLoaded(int mode)
{
	Call_StartForward(H_OnModeLoaded);
	Call_PushCell(mode);
	Call_Finish();
}

void Call_GOKZ_OnModeUnloaded(int mode)
{
	Call_StartForward(H_OnModeUnloaded);
	Call_PushCell(mode);
	Call_Finish();
}

void Call_GOKZ_OnTimerNativeCalledExternally(Handle plugin, int client, Action &result)
{
	Call_StartForward(H_OnTimerNativeCalledExternally);
	Call_PushCell(plugin);
	Call_PushCell(client);
	Call_Finish(result);
}

void Call_GOKZ_OnOptionsMenuCreated(TopMenu topMenu)
{
	Call_StartForward(H_OnOptionsMenuCreated);
	Call_PushCell(topMenu);
	Call_Finish();
}

void Call_GOKZ_OnOptionsMenuReady(TopMenu topMenu)
{
	Call_StartForward(H_OnOptionsMenuReady);
	Call_PushCell(topMenu);
	Call_Finish();
}

void Call_GOKZ_OnCourseRegistered(int course)
{
	Call_StartForward(H_OnCourseRegistered);
	Call_PushCell(course);
	Call_Finish();
}

void Call_GOKZ_OnRunInvalidated(int client)
{
	Call_StartForward(H_OnRunInvalidated);
	Call_PushCell(client);
	Call_Finish();
}

void Call_GOKZ_OnEmitSoundToClient(int client, const char[] sample, float &volume, const char[] description, Action &result)
{
	Call_StartForward(H_OnEmitSoundToClient);
	Call_PushCell(client);
	Call_PushString(sample);
	Call_PushFloatRef(volume);
	Call_PushString(description);
	Call_Finish(result);
}