@amxts/core 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -25
- package/README.ru.md +22 -24
- package/as/amxts.d.ts +63 -3
- package/as/constants.ts +684 -116
- package/as/entities.ts +1905 -1364
- package/as/events.ts +1696 -907
- package/as/facade.ts +1240 -220
- package/as/fetch.ts +1519 -0
- package/as/flags.ts +159 -145
- package/as/hlds.ts +1071 -0
- package/as/hooks.ts +5226 -5379
- package/as/kit.ts +15 -5
- package/as/lib/check.ts +1 -1
- package/as/natives.ts +2658 -2499
- package/as/remote.ts +39 -15
- package/as/tsconfig.json +7 -2
- package/as/vector.ts +12 -9
- package/includes/order.txt +22 -29
- package/includes/sources.json +0 -8
- package/node_modules/assemblyscript/std/assembly/index.d.ts +20 -11
- package/package.json +29 -7
- package/runtime/deps/assemblyscript/dist/asc.js +86 -16
- package/runtime/deps/assemblyscript/dist/assemblyscript.js +29 -29
- package/runtime/licenses/MPL-2.0.txt +373 -0
- package/runtime/licenses/README.md +5 -1
- package/runtime/licenses/curl-COPYING +22 -0
- package/runtime/licenses/libssh2-COPYING +43 -0
- package/runtime/licenses/mbedTLS-LICENSE +553 -0
- package/runtime/natives.txt +108 -105
- package/runtime/patches/assemblyscript-0.28.20-amxts.patch +752 -296
- package/runtime/patches/wamr-2.4.5-amxts.patch +148 -0
- package/scripts/apply-docs.ts +2 -2
- package/scripts/auto-imports.ts +2 -2
- package/scripts/build-identity.ts +115 -0
- package/scripts/build-wasm.ts +101 -50
- package/scripts/check.ts +17 -3
- package/scripts/client-messages.ts +246 -0
- package/scripts/compile-cache.ts +4 -2
- package/scripts/compile-pool.ts +128 -0
- package/scripts/compile-worker.ts +23 -0
- package/scripts/compile.ts +156 -59
- package/scripts/docker-server.ts +13 -3
- package/scripts/docs/as/amxts.ts +86 -0
- package/scripts/docs/as/facade.ts +688 -188
- package/scripts/docs/as/fetch.ts +805 -0
- package/scripts/docs/entities.ts +43 -144
- package/scripts/docs/events.ts +17 -28
- package/scripts/docs/game.ts +68 -22
- package/scripts/docs/messages.ts +330 -16
- package/scripts/editor-api.ts +101 -0
- package/scripts/hlds-events.ts +370 -0
- package/scripts/includes.ts +12 -10
- package/scripts/player-fields.ts +16 -15
- package/scripts/prebuilt.ts +65 -23
- package/scripts/prepare.ts +42 -28
- package/scripts/project.ts +120 -20
- package/scripts/reapi-events.ts +98 -0
- package/scripts/shared-modules.ts +85 -23
- package/scripts/source-map.ts +242 -0
- package/scripts/system.ts +1 -1
- package/scripts/typed-commands.ts +263 -0
- package/scripts/typed-configs.ts +23 -12
- package/scripts/ui.ts +3 -1
- package/scripts/upgrade-menus.ts +274 -0
- package/scripts/upgrade-names.ts +384 -0
- package/scripts/upgrade.ts +857 -0
- package/src/cli-api.mjs +37 -4
- package/src/system.mjs +74 -3
- package/src/testing/compile.ts +8 -5
- package/src/testing/index.ts +2 -1
- package/src/testing/natives.ts +199 -5
- package/src/testing/network.ts +531 -0
- package/src/testing/server.ts +572 -48
- package/src/testing/setup.ts +1 -1
- package/src/testing/tables.ts +25 -0
- package/as/modules/http.ts +0 -184
- package/scripts/docs/as/modules/http.ts +0 -66
package/as/events.ts
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
//
|
|
4
4
|
// The events a server raises, one per forward the host plugin relays:
|
|
5
5
|
//
|
|
6
|
-
// server.addEventListener("
|
|
6
|
+
// server.addEventListener("putInServer", (event) => print(event.player, "Welcome!"));
|
|
7
7
|
//
|
|
8
8
|
// ServerEventMap is what an editor reads - the event's name to its type, as
|
|
9
9
|
// the DOM's HTMLElementEventMap - and the compiler reads the same map through
|
|
10
10
|
// a patch (runtime/patches: `K extends keyof M` and `M[K]`), so an untyped
|
|
11
11
|
// `(event) => ...` gets the event's type. Underneath, each event keeps its
|
|
12
|
-
// listeners in an array and relays its forward
|
|
13
|
-
import { Client, ClientMessage, Player, PlayerChangeEvent, StatusIconState, Team, VariantName, __forwardNumbers, __nativeCell, __nativeString, __nativeVector } from "./facade";
|
|
12
|
+
// listeners in an array and relays its forward while the array has any.
|
|
13
|
+
import { Client, ClientMessage, FadeDirection, Player, PlayerChangeEvent, StatusIconState, Team, VariantName, __forwardNumbers, __nativeCell, __nativeString, __nativeVector, __off } from "./facade";
|
|
14
14
|
import { Vector } from "./vector";
|
|
15
15
|
import { WeaponKind, weaponKindOf } from "./entities";
|
|
16
|
-
import { DAMAGE, Damage, HIDE_HUD, HideHud } from "./flags";
|
|
16
|
+
import { DAMAGE, Damage, HIDE_HUD, HideHud, SCORE_STATUS, ScoreStatus } from "./flags";
|
|
17
|
+
import { VguiMenu } from "./hooks";
|
|
17
18
|
|
|
18
19
|
// @ts-ignore: decorator
|
|
19
20
|
@external("env", "on")
|
|
@@ -67,7 +68,7 @@ export class ServerChangelevelEvent {
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
|
-
* Every
|
|
71
|
+
* Every plugin has started: the moment to create forwards other plugins listen to. The configs run after it: read cvars in `"configsExecuted"`.
|
|
71
72
|
*
|
|
72
73
|
* Note: When this forward is called, most plugins should have registered their cvars and commands already.
|
|
73
74
|
*
|
|
@@ -125,7 +126,7 @@ export class ClientInfochangedEvent {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
|
-
* A player started connecting. The player is not in the game yet: show him anything after `"
|
|
129
|
+
* A player started connecting. The player is not in the game yet: show him anything after `"putInServer"`.
|
|
129
130
|
*
|
|
130
131
|
* Note: This forward is called too early to do anything that directly affects the client.
|
|
131
132
|
*
|
|
@@ -186,7 +187,7 @@ export class ClientConnectexEvent {
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
/**
|
|
189
|
-
* A player's SteamID is known. May come before or after `"
|
|
190
|
+
* A player's SteamID is known. May come before or after `"putInServer"`.
|
|
190
191
|
*
|
|
191
192
|
* Note: A bot's SteamID is `"BOT"`.
|
|
192
193
|
*
|
|
@@ -200,33 +201,15 @@ export class ClientAuthorizedEvent {
|
|
|
200
201
|
*/
|
|
201
202
|
player: Client;
|
|
202
203
|
/**
|
|
203
|
-
* The player's SteamID, e.g. `"STEAM_0:1:12345"`. A bot has `"BOT"`, HLTV has `"HLTV"`; on a LAN server it is `"STEAM_ID_LAN"`.
|
|
204
|
+
* The player's SteamID, e.g. `"STEAM_0:1:12345"`. A bot has `"BOT"`, HLTV has `"HLTV"`; on a LAN server it is `"STEAM_ID_LAN"`. With Reunion a game without Steam gets one made from its key: `"STEAM_..."` or `"VALVE_..."`, as the server's Reunion settings say.
|
|
204
205
|
*
|
|
205
206
|
* Pawn: `authid[]`
|
|
206
207
|
*/
|
|
207
|
-
|
|
208
|
+
steamId: string;
|
|
208
209
|
|
|
209
|
-
constructor(player: Client,
|
|
210
|
-
this.player = player;
|
|
211
|
-
this.authid = authid;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Old form of `"disconnected"` that misses some cases: use `"disconnected"`.
|
|
217
|
-
*
|
|
218
|
-
* Pawn: `client_disconnect(id)`
|
|
219
|
-
*/
|
|
220
|
-
export class ClientDisconnectEvent {
|
|
221
|
-
/**
|
|
222
|
-
* The player the event is about.
|
|
223
|
-
*
|
|
224
|
-
* Pawn: `id`
|
|
225
|
-
*/
|
|
226
|
-
player: Player;
|
|
227
|
-
|
|
228
|
-
constructor(player: Player) {
|
|
210
|
+
constructor(player: Client, steamId: string) {
|
|
229
211
|
this.player = player;
|
|
212
|
+
this.steamId = steamId;
|
|
230
213
|
}
|
|
231
214
|
}
|
|
232
215
|
|
|
@@ -331,7 +314,7 @@ export class ClientCommandEvent {
|
|
|
331
314
|
* Pawn: `client_putinserver(id)`
|
|
332
315
|
*
|
|
333
316
|
* @example
|
|
334
|
-
* server.addEventListener("
|
|
317
|
+
* server.addEventListener("putInServer", (event) => {
|
|
335
318
|
* print(event.player, "Welcome!");
|
|
336
319
|
* });
|
|
337
320
|
*/
|
|
@@ -365,7 +348,7 @@ export class InconsistentFileEvent {
|
|
|
365
348
|
*
|
|
366
349
|
* Pawn: `filename[]`
|
|
367
350
|
*/
|
|
368
|
-
|
|
351
|
+
file: string;
|
|
369
352
|
/**
|
|
370
353
|
* Buffer storing the disconnect reason (can be overwritten)
|
|
371
354
|
*
|
|
@@ -373,9 +356,9 @@ export class InconsistentFileEvent {
|
|
|
373
356
|
*/
|
|
374
357
|
reason: string;
|
|
375
358
|
|
|
376
|
-
constructor(player: Player,
|
|
359
|
+
constructor(player: Player, file: string, reason: string) {
|
|
377
360
|
this.player = player;
|
|
378
|
-
this.
|
|
361
|
+
this.file = file;
|
|
379
362
|
this.reason = reason;
|
|
380
363
|
}
|
|
381
364
|
}
|
|
@@ -428,11 +411,11 @@ export class CS_InternalCommandEvent {
|
|
|
428
411
|
*
|
|
429
412
|
* Pawn: `cmd[]`
|
|
430
413
|
*/
|
|
431
|
-
|
|
414
|
+
command: string;
|
|
432
415
|
|
|
433
|
-
constructor(player: Player,
|
|
416
|
+
constructor(player: Player, command: string) {
|
|
434
417
|
this.player = player;
|
|
435
|
-
this.
|
|
418
|
+
this.command = command;
|
|
436
419
|
}
|
|
437
420
|
}
|
|
438
421
|
|
|
@@ -492,31 +475,6 @@ export class CS_OnBuyEvent {
|
|
|
492
475
|
}
|
|
493
476
|
}
|
|
494
477
|
|
|
495
|
-
/**
|
|
496
|
-
* Two entities touched.
|
|
497
|
-
*
|
|
498
|
-
* Pawn: `pfn_touch(ptr, ptd)`
|
|
499
|
-
*/
|
|
500
|
-
export class PfnTouchEvent {
|
|
501
|
-
/**
|
|
502
|
-
* The entity that moved into the other.
|
|
503
|
-
*
|
|
504
|
-
* Pawn: `ptr`
|
|
505
|
-
*/
|
|
506
|
-
toucher: number;
|
|
507
|
-
/**
|
|
508
|
-
* The entity that was touched.
|
|
509
|
-
*
|
|
510
|
-
* Pawn: `ptd`
|
|
511
|
-
*/
|
|
512
|
-
touched: number;
|
|
513
|
-
|
|
514
|
-
constructor(toucher: number, touched: number) {
|
|
515
|
-
this.toucher = toucher;
|
|
516
|
-
this.touched = touched;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
478
|
/**
|
|
521
479
|
* A server frame, hundreds of times a second. Keep the listener tiny, or use `setInterval`.
|
|
522
480
|
*
|
|
@@ -545,46 +503,6 @@ export class ClientKillEvent {
|
|
|
545
503
|
}
|
|
546
504
|
}
|
|
547
505
|
|
|
548
|
-
/**
|
|
549
|
-
* Called at the start of each client think.
|
|
550
|
-
*
|
|
551
|
-
* Note: Using his forward can easily become performance-critical. More specific hooks and forwards should be used whenever possible.
|
|
552
|
-
*
|
|
553
|
-
* Pawn: `client_PreThink(id)`
|
|
554
|
-
*/
|
|
555
|
-
export class Client_PreThinkEvent {
|
|
556
|
-
/**
|
|
557
|
-
* The player the event is about.
|
|
558
|
-
*
|
|
559
|
-
* Pawn: `id`
|
|
560
|
-
*/
|
|
561
|
-
player: Player;
|
|
562
|
-
|
|
563
|
-
constructor(player: Player) {
|
|
564
|
-
this.player = player;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Called after each client think.
|
|
570
|
-
*
|
|
571
|
-
* Note: Using his forward can easily become performance-critical. More specific hooks and forwards should be used whenever possible.
|
|
572
|
-
*
|
|
573
|
-
* Pawn: `client_PostThink(id)`
|
|
574
|
-
*/
|
|
575
|
-
export class Client_PostThinkEvent {
|
|
576
|
-
/**
|
|
577
|
-
* The player the event is about.
|
|
578
|
-
*
|
|
579
|
-
* Pawn: `id`
|
|
580
|
-
*/
|
|
581
|
-
player: Player;
|
|
582
|
-
|
|
583
|
-
constructor(player: Player) {
|
|
584
|
-
this.player = player;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
506
|
/**
|
|
589
507
|
* A player sent an impulse: `100` is the flashlight, `201` the spray.
|
|
590
508
|
*
|
|
@@ -631,7 +549,7 @@ export class ClientCmdStartEvent {
|
|
|
631
549
|
}
|
|
632
550
|
|
|
633
551
|
/**
|
|
634
|
-
* An entity thinks: its scheduled update has come.
|
|
552
|
+
* An entity thinks: its scheduled update has come. Any entity's; one class's is `game.addEventListener("think", listener, { classname })`.
|
|
635
553
|
*
|
|
636
554
|
* Pawn: `pfn_think(entid)`
|
|
637
555
|
*/
|
|
@@ -671,7 +589,7 @@ export class PfnPlaybackeventEvent {
|
|
|
671
589
|
*
|
|
672
590
|
* Pawn: `eventid`
|
|
673
591
|
*/
|
|
674
|
-
|
|
592
|
+
eventIndex: number;
|
|
675
593
|
/**
|
|
676
594
|
* The seconds before the event plays.
|
|
677
595
|
*
|
|
@@ -727,10 +645,10 @@ export class PfnPlaybackeventEvent {
|
|
|
727
645
|
*/
|
|
728
646
|
bparam2: number;
|
|
729
647
|
|
|
730
|
-
constructor(flags: number, entity: number,
|
|
648
|
+
constructor(flags: number, entity: number, eventIndex: number, delay: number, origin: Vector, angles: Vector, fparam1: number, fparam2: number, iparam1: number, iparam2: number, bparam1: number, bparam2: number) {
|
|
731
649
|
this.flags = flags;
|
|
732
650
|
this.entity = entity;
|
|
733
|
-
this.
|
|
651
|
+
this.eventIndex = eventIndex;
|
|
734
652
|
this.delay = delay;
|
|
735
653
|
this.origin = origin;
|
|
736
654
|
this.angles = angles;
|
|
@@ -764,7 +682,7 @@ export class PfnKeyvalueEvent {
|
|
|
764
682
|
}
|
|
765
683
|
|
|
766
684
|
/**
|
|
767
|
-
* An entity is being spawned on the map.
|
|
685
|
+
* An entity is being spawned on the map, the map's own too as it loads. A player's spawn is `game.addEventListener("spawn", listener)`.
|
|
768
686
|
*
|
|
769
687
|
* Pawn: `pfn_spawn(entid)`
|
|
770
688
|
*/
|
|
@@ -786,6 +704,9 @@ const MESSAGE_TEAMS: Team[] = ["UNASSIGNED", "TERRORIST", "CT", "SPECTATOR"];
|
|
|
786
704
|
const STATUS_ICON_STATES: StatusIconState[] = ["hide", "show", "flash"];
|
|
787
705
|
const MESSAGE_DESTINATIONS: VariantName[] = ["notify", "notify", "console", "chat", "center"];
|
|
788
706
|
|
|
707
|
+
// ScreenFade's flag for a fade from a clear view to the colour.
|
|
708
|
+
const FFADE_OUT = 1;
|
|
709
|
+
|
|
789
710
|
/** A WeaponKind's id, as a message carries it; 0 for one it does not know. */
|
|
790
711
|
function weaponIdOf(kind: WeaponKind): i32 {
|
|
791
712
|
for (let id = 1; id < 32; id++) {
|
|
@@ -794,9 +715,80 @@ function weaponIdOf(kind: WeaponKind): i32 {
|
|
|
794
715
|
return 0;
|
|
795
716
|
}
|
|
796
717
|
|
|
718
|
+
/** A team a message writes as text; one it does not name is "UNASSIGNED". */
|
|
719
|
+
function messageTeam(text: string): Team {
|
|
720
|
+
const team = <Team>text;
|
|
721
|
+
return MESSAGE_TEAMS.includes(team) ? team : "UNASSIGNED";
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** A VGUIMenu number as its name; a number it does not name reads as "unknown". */
|
|
725
|
+
function vguiMenuName(cell: i32): VguiMenu {
|
|
726
|
+
switch (cell) {
|
|
727
|
+
case 2: return "team";
|
|
728
|
+
case 4: return "mapBriefing";
|
|
729
|
+
case 26: return "classT";
|
|
730
|
+
case 27: return "classCT";
|
|
731
|
+
case 28: return "buy";
|
|
732
|
+
case 29: return "buyPistol";
|
|
733
|
+
case 30: return "buyShotGun";
|
|
734
|
+
case 31: return "buyRifle";
|
|
735
|
+
case 32: return "buySubMachineGun";
|
|
736
|
+
case 33: return "buyMachineGun";
|
|
737
|
+
case 34: return "buyItem";
|
|
738
|
+
}
|
|
739
|
+
return "unknown";
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/** A VguiMenu name as its number; "unknown" keeps the argument as it came. */
|
|
743
|
+
function vguiMenuCell(name: VguiMenu, current: i32): i32 {
|
|
744
|
+
if (name == "team") return 2;
|
|
745
|
+
if (name == "mapBriefing") return 4;
|
|
746
|
+
if (name == "classT") return 26;
|
|
747
|
+
if (name == "classCT") return 27;
|
|
748
|
+
if (name == "buy") return 28;
|
|
749
|
+
if (name == "buyPistol") return 29;
|
|
750
|
+
if (name == "buyShotGun") return 30;
|
|
751
|
+
if (name == "buyRifle") return 31;
|
|
752
|
+
if (name == "buySubMachineGun") return 32;
|
|
753
|
+
if (name == "buyMachineGun") return 33;
|
|
754
|
+
if (name == "buyItem") return 34;
|
|
755
|
+
return current;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* A player's HUD stops showing the round's advertisement.
|
|
760
|
+
*
|
|
761
|
+
* The game's `ADStop` message.
|
|
762
|
+
*
|
|
763
|
+
* Pawn: `register_message(get_user_msgid("ADStop"), ...)`
|
|
764
|
+
*/
|
|
765
|
+
export class ADStopMessage extends ClientMessage {
|
|
766
|
+
private readonly kind: string = "ADStop";
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Whether a player may pick Spectate in the team menu.
|
|
771
|
+
*
|
|
772
|
+
* The game's `AllowSpec` message.
|
|
773
|
+
*
|
|
774
|
+
* Pawn: `register_message(get_user_msgid("AllowSpec"), ...)`
|
|
775
|
+
*/
|
|
776
|
+
export class AllowSpecMessage extends ClientMessage {
|
|
777
|
+
private readonly kind: string = "AllowSpec";
|
|
778
|
+
/**
|
|
779
|
+
* `true` when the menu offers it.
|
|
780
|
+
*
|
|
781
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
782
|
+
*/
|
|
783
|
+
get allowed(): boolean { return this.__number(1) != 0; }
|
|
784
|
+
set allowed(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
785
|
+
}
|
|
786
|
+
|
|
797
787
|
/**
|
|
798
788
|
* A player picks up ammo: the notice at the side of his screen.
|
|
799
789
|
*
|
|
790
|
+
* The game's `AmmoPickup` message.
|
|
791
|
+
*
|
|
800
792
|
* Pawn: `register_message(get_user_msgid("AmmoPickup"), ...)`
|
|
801
793
|
*/
|
|
802
794
|
export class AmmoPickupMessage extends ClientMessage {
|
|
@@ -818,9 +810,54 @@ export class AmmoPickupMessage extends ClientMessage {
|
|
|
818
810
|
}
|
|
819
811
|
|
|
820
812
|
/**
|
|
821
|
-
*
|
|
813
|
+
* A player's reserve ammo of one kind on his HUD changes.
|
|
814
|
+
*
|
|
815
|
+
* The game's `AmmoX` message.
|
|
816
|
+
*
|
|
817
|
+
* Pawn: `register_message(get_user_msgid("AmmoX"), ...)`
|
|
818
|
+
*/
|
|
819
|
+
export class AmmoXMessage extends ClientMessage {
|
|
820
|
+
private readonly kind: string = "AmmoX";
|
|
821
|
+
/**
|
|
822
|
+
* The ammo's index in the game's list of kinds.
|
|
823
|
+
*
|
|
824
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
825
|
+
*/
|
|
826
|
+
get ammo(): number { return this.__number(1); }
|
|
827
|
+
set ammo(value: number) { this.__setNumber(1, value); }
|
|
828
|
+
/**
|
|
829
|
+
* The reserve shown.
|
|
830
|
+
*
|
|
831
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
832
|
+
*/
|
|
833
|
+
get amount(): number { return this.__number(2); }
|
|
834
|
+
set amount(value: number) { this.__setNumber(2, value); }
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* The armour icon on a player's HUD: a vest, or a vest and a helmet.
|
|
839
|
+
*
|
|
840
|
+
* The game's `ArmorType` message.
|
|
841
|
+
*
|
|
842
|
+
* Pawn: `register_message(get_user_msgid("ArmorType"), ...)`
|
|
843
|
+
*/
|
|
844
|
+
export class ArmorTypeMessage extends ClientMessage {
|
|
845
|
+
private readonly kind: string = "ArmorType";
|
|
846
|
+
/**
|
|
847
|
+
* `true` for a vest and a helmet.
|
|
848
|
+
*
|
|
849
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
850
|
+
*/
|
|
851
|
+
get helmet(): boolean { return this.__number(1) != 0; }
|
|
852
|
+
set helmet(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* The progress bar in the middle of a player's screen is shown or hidden, from empty or part of the way full.
|
|
857
|
+
*
|
|
858
|
+
* The game's `BarTime` and `BarTime2` messages.
|
|
822
859
|
*
|
|
823
|
-
* Pawn: `register_message(get_user_msgid("BarTime"), ...)`
|
|
860
|
+
* Pawn: `register_message(get_user_msgid("BarTime"), ...)`, `register_message(get_user_msgid("BarTime2"), ...)`
|
|
824
861
|
*/
|
|
825
862
|
export class BarTimeMessage extends ClientMessage {
|
|
826
863
|
private readonly kind: string = "BarTime";
|
|
@@ -831,11 +868,20 @@ export class BarTimeMessage extends ClientMessage {
|
|
|
831
868
|
*/
|
|
832
869
|
get seconds(): number { return this.__number(1); }
|
|
833
870
|
set seconds(value: number) { this.__setNumber(1, value); }
|
|
871
|
+
/**
|
|
872
|
+
* The bar's fill at the start, in percent. `BarTime` does not carry it: there it reads as `0`, and writing it does nothing.
|
|
873
|
+
*
|
|
874
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
875
|
+
*/
|
|
876
|
+
get startPercent(): number { return this.__number(2); }
|
|
877
|
+
set startPercent(value: number) { this.__setNumber(2, value); }
|
|
834
878
|
}
|
|
835
879
|
|
|
836
880
|
/**
|
|
837
881
|
* A player's armour on his HUD changes.
|
|
838
882
|
*
|
|
883
|
+
* The game's `Battery` message.
|
|
884
|
+
*
|
|
839
885
|
* Pawn: `register_message(get_user_msgid("Battery"), ...)`
|
|
840
886
|
*/
|
|
841
887
|
export class BatteryMessage extends ClientMessage {
|
|
@@ -849,9 +895,101 @@ export class BatteryMessage extends ClientMessage {
|
|
|
849
895
|
set armor(value: number) { this.__setNumber(1, value); }
|
|
850
896
|
}
|
|
851
897
|
|
|
898
|
+
/**
|
|
899
|
+
* A player's money on his HUD blinks: he cannot afford what he tried to buy.
|
|
900
|
+
*
|
|
901
|
+
* The game's `BlinkAcct` message.
|
|
902
|
+
*
|
|
903
|
+
* Pawn: `register_message(get_user_msgid("BlinkAcct"), ...)`
|
|
904
|
+
*/
|
|
905
|
+
export class BlinkAcctMessage extends ClientMessage {
|
|
906
|
+
private readonly kind: string = "BlinkAcct";
|
|
907
|
+
/**
|
|
908
|
+
* The number of blinks.
|
|
909
|
+
*
|
|
910
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
911
|
+
*/
|
|
912
|
+
get blinks(): number { return this.__number(1); }
|
|
913
|
+
set blinks(value: number) { this.__setNumber(1, value); }
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* The bomb on the terrorists' radar: dropped or planted.
|
|
918
|
+
*
|
|
919
|
+
* The game's `BombDrop` message.
|
|
920
|
+
*
|
|
921
|
+
* Pawn: `register_message(get_user_msgid("BombDrop"), ...)`
|
|
922
|
+
*/
|
|
923
|
+
export class BombDropMessage extends ClientMessage {
|
|
924
|
+
private readonly kind: string = "BombDrop";
|
|
925
|
+
/**
|
|
926
|
+
* The point where the bomb lies.
|
|
927
|
+
*
|
|
928
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
929
|
+
*/
|
|
930
|
+
get origin(): Vector { return this.__vector(1); }
|
|
931
|
+
set origin(value: number[]) { this.__setVector(1, value); }
|
|
932
|
+
/**
|
|
933
|
+
* `true` for a bomb planted, `false` for one dropped.
|
|
934
|
+
*
|
|
935
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
936
|
+
*/
|
|
937
|
+
get planted(): boolean { return this.__number(4) != 0; }
|
|
938
|
+
set planted(value: boolean) { this.__setNumber(4, value ? 1 : 0); }
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* The bomb is picked up: it leaves the terrorists' radar.
|
|
943
|
+
*
|
|
944
|
+
* The game's `BombPickup` message.
|
|
945
|
+
*
|
|
946
|
+
* Pawn: `register_message(get_user_msgid("BombPickup"), ...)`
|
|
947
|
+
*/
|
|
948
|
+
export class BombPickupMessage extends ClientMessage {
|
|
949
|
+
private readonly kind: string = "BombPickup";
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* The voice icon over a bot who talks on the radio.
|
|
954
|
+
*
|
|
955
|
+
* The game's `BotVoice` message.
|
|
956
|
+
*
|
|
957
|
+
* Pawn: `register_message(get_user_msgid("BotVoice"), ...)`
|
|
958
|
+
*/
|
|
959
|
+
export class BotVoiceMessage extends ClientMessage {
|
|
960
|
+
private readonly kind: string = "BotVoice";
|
|
961
|
+
/**
|
|
962
|
+
* `true` while the bot talks.
|
|
963
|
+
*
|
|
964
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
965
|
+
*/
|
|
966
|
+
get talking(): boolean { return this.__number(1) != 0; }
|
|
967
|
+
set talking(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
968
|
+
/**
|
|
969
|
+
* The bot who talks.
|
|
970
|
+
*
|
|
971
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
972
|
+
*/
|
|
973
|
+
get target(): Player | null { return this.__player(2); }
|
|
974
|
+
set target(value: Player | null) { this.__setNumber(2, value != null ? value.id : 0); }
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* A player's buy menu is closed.
|
|
979
|
+
*
|
|
980
|
+
* The game's `BuyClose` message.
|
|
981
|
+
*
|
|
982
|
+
* Pawn: `register_message(get_user_msgid("BuyClose"), ...)`
|
|
983
|
+
*/
|
|
984
|
+
export class BuyCloseMessage extends ClientMessage {
|
|
985
|
+
private readonly kind: string = "BuyClose";
|
|
986
|
+
}
|
|
987
|
+
|
|
852
988
|
/**
|
|
853
989
|
* A dead player's body is left on the ground for the clients to draw.
|
|
854
990
|
*
|
|
991
|
+
* The game's `ClCorpse` message.
|
|
992
|
+
*
|
|
855
993
|
* Pawn: `register_message(get_user_msgid("ClCorpse"), ...)`
|
|
856
994
|
*/
|
|
857
995
|
export class ClCorpseMessage extends ClientMessage {
|
|
@@ -863,6 +1001,13 @@ export class ClCorpseMessage extends ClientMessage {
|
|
|
863
1001
|
*/
|
|
864
1002
|
get model(): string { return this.__text(1); }
|
|
865
1003
|
set model(value: string) { this.__setText(1, value); }
|
|
1004
|
+
/**
|
|
1005
|
+
* The team of the player whose body it is.
|
|
1006
|
+
*
|
|
1007
|
+
* Pawn: `get_msg_arg_*(11)`
|
|
1008
|
+
*/
|
|
1009
|
+
get team(): Team { return MESSAGE_TEAMS[<i32>min(max(this.__number(11), 0), 3)]; }
|
|
1010
|
+
set team(value: Team) { this.__setNumber(11, max(MESSAGE_TEAMS.indexOf(value), 0)); }
|
|
866
1011
|
/**
|
|
867
1012
|
* The player whose body it is.
|
|
868
1013
|
*
|
|
@@ -872,9 +1017,29 @@ export class ClCorpseMessage extends ClientMessage {
|
|
|
872
1017
|
set target(value: Player | null) { this.__setNumber(12, value != null ? value.id : 0); }
|
|
873
1018
|
}
|
|
874
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* Counter-Strike's own crosshair on a player's screen is shown or hidden.
|
|
1022
|
+
*
|
|
1023
|
+
* The game's `Crosshair` message.
|
|
1024
|
+
*
|
|
1025
|
+
* Pawn: `register_message(get_user_msgid("Crosshair"), ...)`
|
|
1026
|
+
*/
|
|
1027
|
+
export class CrosshairMessage extends ClientMessage {
|
|
1028
|
+
private readonly kind: string = "Crosshair";
|
|
1029
|
+
/**
|
|
1030
|
+
* `true` to show it.
|
|
1031
|
+
*
|
|
1032
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1033
|
+
*/
|
|
1034
|
+
get shown(): boolean { return this.__number(1) != 0; }
|
|
1035
|
+
set shown(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
1036
|
+
}
|
|
1037
|
+
|
|
875
1038
|
/**
|
|
876
1039
|
* The weapon in a player's hands and its clip on his HUD.
|
|
877
1040
|
*
|
|
1041
|
+
* The game's `CurWeapon` message.
|
|
1042
|
+
*
|
|
878
1043
|
* Pawn: `register_message(get_user_msgid("CurWeapon"), ...)`
|
|
879
1044
|
*/
|
|
880
1045
|
export class CurWeaponMessage extends ClientMessage {
|
|
@@ -905,6 +1070,8 @@ export class CurWeaponMessage extends ClientMessage {
|
|
|
905
1070
|
/**
|
|
906
1071
|
* A player is shown the damage he took: the red marks at the side of his screen.
|
|
907
1072
|
*
|
|
1073
|
+
* The game's `Damage` message.
|
|
1074
|
+
*
|
|
908
1075
|
* Pawn: `register_message(get_user_msgid("Damage"), ...)`
|
|
909
1076
|
*/
|
|
910
1077
|
export class DamageMessage extends ClientMessage {
|
|
@@ -924,17 +1091,26 @@ export class DamageMessage extends ClientMessage {
|
|
|
924
1091
|
get damage(): number { return this.__number(2); }
|
|
925
1092
|
set damage(value: number) { this.__setNumber(2, value); }
|
|
926
1093
|
/**
|
|
927
|
-
* The kinds of damage, e.g. `"
|
|
1094
|
+
* The kinds of damage, e.g. `"fall"`, `"bullet"`.
|
|
928
1095
|
*
|
|
929
1096
|
* Pawn: `get_msg_arg_*(3)`
|
|
930
1097
|
*/
|
|
931
1098
|
get damageType(): Damage[] { return <Damage[]>DAMAGE.namesOf(<i32>this.__number(3)); }
|
|
932
1099
|
set damageType(value: Damage[]) { this.__setNumber(3, DAMAGE.maskOf(value)); }
|
|
1100
|
+
/**
|
|
1101
|
+
* The point the damage came from: the marks point to it.
|
|
1102
|
+
*
|
|
1103
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
1104
|
+
*/
|
|
1105
|
+
get origin(): Vector { return this.__vector(4); }
|
|
1106
|
+
set origin(value: number[]) { this.__setVector(4, value); }
|
|
933
1107
|
}
|
|
934
1108
|
|
|
935
1109
|
/**
|
|
936
1110
|
* A kill in the top right corner of every screen.
|
|
937
1111
|
*
|
|
1112
|
+
* The game's `DeathMsg` message.
|
|
1113
|
+
*
|
|
938
1114
|
* Pawn: `register_message(get_user_msgid("DeathMsg"), ...)`
|
|
939
1115
|
*/
|
|
940
1116
|
export class DeathMsgMessage extends ClientMessage {
|
|
@@ -969,9 +1145,72 @@ export class DeathMsgMessage extends ClientMessage {
|
|
|
969
1145
|
set weapon(value: string) { this.__setText(4, value); }
|
|
970
1146
|
}
|
|
971
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* The flashlight icon on a player's HUD: on or off, and its battery.
|
|
1150
|
+
*
|
|
1151
|
+
* The game's `Flashlight` message.
|
|
1152
|
+
*
|
|
1153
|
+
* Pawn: `register_message(get_user_msgid("Flashlight"), ...)`
|
|
1154
|
+
*/
|
|
1155
|
+
export class FlashlightMessage extends ClientMessage {
|
|
1156
|
+
private readonly kind: string = "Flashlight";
|
|
1157
|
+
/**
|
|
1158
|
+
* `true` while the flashlight is on.
|
|
1159
|
+
*
|
|
1160
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1161
|
+
*/
|
|
1162
|
+
get on(): boolean { return this.__number(1) != 0; }
|
|
1163
|
+
set on(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
1164
|
+
/**
|
|
1165
|
+
* The flashlight's battery, in percent.
|
|
1166
|
+
*
|
|
1167
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1168
|
+
*/
|
|
1169
|
+
get battery(): number { return this.__number(2); }
|
|
1170
|
+
set battery(value: number) { this.__setNumber(2, value); }
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* The flashlight's battery on a player's HUD changes.
|
|
1175
|
+
*
|
|
1176
|
+
* The game's `FlashBat` message.
|
|
1177
|
+
*
|
|
1178
|
+
* Pawn: `register_message(get_user_msgid("FlashBat"), ...)`
|
|
1179
|
+
*/
|
|
1180
|
+
export class FlashBatMessage extends ClientMessage {
|
|
1181
|
+
private readonly kind: string = "FlashBat";
|
|
1182
|
+
/**
|
|
1183
|
+
* The flashlight's battery, in percent.
|
|
1184
|
+
*
|
|
1185
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1186
|
+
*/
|
|
1187
|
+
get battery(): number { return this.__number(1); }
|
|
1188
|
+
set battery(value: number) { this.__setNumber(1, value); }
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* The Geiger counter's clicks a player hears near radiation.
|
|
1193
|
+
*
|
|
1194
|
+
* The game's `Geiger` message.
|
|
1195
|
+
*
|
|
1196
|
+
* Pawn: `register_message(get_user_msgid("Geiger"), ...)`
|
|
1197
|
+
*/
|
|
1198
|
+
export class GeigerMessage extends ClientMessage {
|
|
1199
|
+
private readonly kind: string = "Geiger";
|
|
1200
|
+
/**
|
|
1201
|
+
* The distance to the radiation: the less, the faster the clicks.
|
|
1202
|
+
*
|
|
1203
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1204
|
+
*/
|
|
1205
|
+
get range(): number { return this.__number(1); }
|
|
1206
|
+
set range(value: number) { this.__setNumber(1, value); }
|
|
1207
|
+
}
|
|
1208
|
+
|
|
972
1209
|
/**
|
|
973
1210
|
* A player's health on his HUD changes.
|
|
974
1211
|
*
|
|
1212
|
+
* The game's `Health` message.
|
|
1213
|
+
*
|
|
975
1214
|
* Pawn: `register_message(get_user_msgid("Health"), ...)`
|
|
976
1215
|
*/
|
|
977
1216
|
export class HealthMessage extends ClientMessage {
|
|
@@ -988,12 +1227,14 @@ export class HealthMessage extends ClientMessage {
|
|
|
988
1227
|
/**
|
|
989
1228
|
* The parts of a player's HUD that are hidden change.
|
|
990
1229
|
*
|
|
1230
|
+
* The game's `HideWeapon` message.
|
|
1231
|
+
*
|
|
991
1232
|
* Pawn: `register_message(get_user_msgid("HideWeapon"), ...)`
|
|
992
1233
|
*/
|
|
993
1234
|
export class HideWeaponMessage extends ClientMessage {
|
|
994
1235
|
private readonly kind: string = "HideWeapon";
|
|
995
1236
|
/**
|
|
996
|
-
* The hidden parts, e.g. `"
|
|
1237
|
+
* The hidden parts, e.g. `"money"`, `"timer"`. Assign to change them.
|
|
997
1238
|
*
|
|
998
1239
|
* Pawn: `get_msg_arg_*(1)`
|
|
999
1240
|
*/
|
|
@@ -1002,63 +1243,261 @@ export class HideWeaponMessage extends ClientMessage {
|
|
|
1002
1243
|
}
|
|
1003
1244
|
|
|
1004
1245
|
/**
|
|
1005
|
-
* A
|
|
1246
|
+
* A hostage is killed: it leaves the counter-terrorists' radar.
|
|
1006
1247
|
*
|
|
1007
|
-
*
|
|
1248
|
+
* The game's `HostageK` message.
|
|
1249
|
+
*
|
|
1250
|
+
* Pawn: `register_message(get_user_msgid("HostageK"), ...)`
|
|
1008
1251
|
*/
|
|
1009
|
-
export class
|
|
1010
|
-
private readonly kind: string = "
|
|
1252
|
+
export class HostageKMessage extends ClientMessage {
|
|
1253
|
+
private readonly kind: string = "HostageK";
|
|
1011
1254
|
/**
|
|
1012
|
-
* The
|
|
1255
|
+
* The hostage's number on the map, from `1`.
|
|
1013
1256
|
*
|
|
1014
1257
|
* Pawn: `get_msg_arg_*(1)`
|
|
1015
1258
|
*/
|
|
1016
|
-
get
|
|
1017
|
-
set
|
|
1259
|
+
get hostage(): number { return this.__number(1); }
|
|
1260
|
+
set hostage(value: number) { this.__setNumber(1, value); }
|
|
1018
1261
|
}
|
|
1019
1262
|
|
|
1020
1263
|
/**
|
|
1021
|
-
* A
|
|
1264
|
+
* A hostage on the counter-terrorists' radar.
|
|
1022
1265
|
*
|
|
1023
|
-
*
|
|
1266
|
+
* The game's `HostagePos` message.
|
|
1267
|
+
*
|
|
1268
|
+
* Pawn: `register_message(get_user_msgid("HostagePos"), ...)`
|
|
1024
1269
|
*/
|
|
1025
|
-
export class
|
|
1026
|
-
private readonly kind: string = "
|
|
1270
|
+
export class HostagePosMessage extends ClientMessage {
|
|
1271
|
+
private readonly kind: string = "HostagePos";
|
|
1027
1272
|
/**
|
|
1028
|
-
* The
|
|
1273
|
+
* The hostage's number on the map, from `1`.
|
|
1029
1274
|
*
|
|
1030
|
-
* Pawn: `get_msg_arg_*(
|
|
1275
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1031
1276
|
*/
|
|
1032
|
-
get
|
|
1033
|
-
set
|
|
1277
|
+
get hostage(): number { return this.__number(2); }
|
|
1278
|
+
set hostage(value: number) { this.__setNumber(2, value); }
|
|
1279
|
+
/**
|
|
1280
|
+
* The point where the hostage is.
|
|
1281
|
+
*
|
|
1282
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1283
|
+
*/
|
|
1284
|
+
get origin(): Vector { return this.__vector(3); }
|
|
1285
|
+
set origin(value: number[]) { this.__setVector(3, value); }
|
|
1034
1286
|
}
|
|
1035
1287
|
|
|
1036
1288
|
/**
|
|
1037
|
-
* A
|
|
1289
|
+
* A hint in the middle of a player's screen.
|
|
1038
1290
|
*
|
|
1039
|
-
*
|
|
1291
|
+
* The game's `HudText`, `HudTextArgs` and `HudTextPro` messages.
|
|
1292
|
+
*
|
|
1293
|
+
* Pawn: `register_message(get_user_msgid("HudText"), ...)`, `register_message(get_user_msgid("HudTextArgs"), ...)`, `register_message(get_user_msgid("HudTextPro"), ...)`
|
|
1040
1294
|
*/
|
|
1041
|
-
export class
|
|
1042
|
-
private readonly kind: string = "
|
|
1295
|
+
export class HudTextMessage extends ClientMessage {
|
|
1296
|
+
private readonly kind: string = "HudText";
|
|
1043
1297
|
/**
|
|
1044
|
-
* The
|
|
1298
|
+
* The text, or the game's own for it, e.g. `"#Hint_press_buy_to_purchase"`.
|
|
1045
1299
|
*
|
|
1046
1300
|
* Pawn: `get_msg_arg_*(1)`
|
|
1047
1301
|
*/
|
|
1048
|
-
get
|
|
1049
|
-
set
|
|
1302
|
+
get text(): string { return this.__text(1); }
|
|
1303
|
+
set text(value: string) { this.__setText(1, value); }
|
|
1050
1304
|
/**
|
|
1051
|
-
*
|
|
1305
|
+
* The texts put into the game's text in place of `%s1`, `%s2`, ... - e.g. a player's name. Assign to change them; their number stays. `HudText` or `HudTextPro` does not carry it: there it reads as `[]`, and writing it does nothing.
|
|
1052
1306
|
*
|
|
1053
|
-
* Pawn: `get_msg_arg_*(
|
|
1307
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
1054
1308
|
*/
|
|
1055
|
-
get
|
|
1056
|
-
set
|
|
1309
|
+
get params(): string[] { return this.__texts(4); }
|
|
1310
|
+
set params(value: string[]) { this.__setTexts(4, value); }
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* A player's HUD is set up, when he enters the game.
|
|
1315
|
+
*
|
|
1316
|
+
* The game's `InitHUD` message.
|
|
1317
|
+
*
|
|
1318
|
+
* Pawn: `register_message(get_user_msgid("InitHUD"), ...)`
|
|
1319
|
+
*/
|
|
1320
|
+
export class InitHUDMessage extends ClientMessage {
|
|
1321
|
+
private readonly kind: string = "InitHUD";
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* A player picks up an item: the notice at the side of his screen.
|
|
1326
|
+
*
|
|
1327
|
+
* The game's `ItemPickup` message.
|
|
1328
|
+
*
|
|
1329
|
+
* Pawn: `register_message(get_user_msgid("ItemPickup"), ...)`
|
|
1330
|
+
*/
|
|
1331
|
+
export class ItemPickupMessage extends ClientMessage {
|
|
1332
|
+
private readonly kind: string = "ItemPickup";
|
|
1333
|
+
/**
|
|
1334
|
+
* The item's class name, e.g. `"item_kevlar"`.
|
|
1335
|
+
*
|
|
1336
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1337
|
+
*/
|
|
1338
|
+
get item(): string { return this.__text(1); }
|
|
1339
|
+
set item(value: string) { this.__setText(1, value); }
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* The night vision and the defuse kit a player has, for his HUD.
|
|
1344
|
+
*
|
|
1345
|
+
* The game's `ItemStatus` message.
|
|
1346
|
+
*
|
|
1347
|
+
* Pawn: `register_message(get_user_msgid("ItemStatus"), ...)`
|
|
1348
|
+
*/
|
|
1349
|
+
export class ItemStatusMessage extends ClientMessage {
|
|
1350
|
+
private readonly kind: string = "ItemStatus";
|
|
1351
|
+
/**
|
|
1352
|
+
* `true` when the player has night vision.
|
|
1353
|
+
*
|
|
1354
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1355
|
+
*/
|
|
1356
|
+
get nightVision(): boolean { return this.__bit(1, 1); }
|
|
1357
|
+
set nightVision(value: boolean) { this.__setBit(1, 1, value); }
|
|
1358
|
+
/**
|
|
1359
|
+
* `true` when the player has a defuse kit.
|
|
1360
|
+
*
|
|
1361
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1362
|
+
*/
|
|
1363
|
+
get defuseKit(): boolean { return this.__bit(1, 2); }
|
|
1364
|
+
set defuseKit(value: boolean) { this.__setBit(1, 2, value); }
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* The place on the map a player is in, as the radio names it.
|
|
1369
|
+
*
|
|
1370
|
+
* The game's `Location` message.
|
|
1371
|
+
*
|
|
1372
|
+
* Pawn: `register_message(get_user_msgid("Location"), ...)`
|
|
1373
|
+
*/
|
|
1374
|
+
export class LocationMessage extends ClientMessage {
|
|
1375
|
+
private readonly kind: string = "Location";
|
|
1376
|
+
/**
|
|
1377
|
+
* The player whose place it is.
|
|
1378
|
+
*
|
|
1379
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1380
|
+
*/
|
|
1381
|
+
get target(): Player | null { return this.__player(1); }
|
|
1382
|
+
set target(value: Player | null) { this.__setNumber(1, value != null ? value.id : 0); }
|
|
1383
|
+
/**
|
|
1384
|
+
* The place's name, e.g. `"BombsiteA"`.
|
|
1385
|
+
*
|
|
1386
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1387
|
+
*/
|
|
1388
|
+
get place(): string { return this.__text(2); }
|
|
1389
|
+
set place(value: string) { this.__setText(2, value); }
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* A player's money on his HUD changes.
|
|
1394
|
+
*
|
|
1395
|
+
* The game's `Money` message.
|
|
1396
|
+
*
|
|
1397
|
+
* Pawn: `register_message(get_user_msgid("Money"), ...)`
|
|
1398
|
+
*/
|
|
1399
|
+
export class MoneyMessage extends ClientMessage {
|
|
1400
|
+
private readonly kind: string = "Money";
|
|
1401
|
+
/**
|
|
1402
|
+
* The money shown.
|
|
1403
|
+
*
|
|
1404
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1405
|
+
*/
|
|
1406
|
+
get amount(): number { return this.__number(1); }
|
|
1407
|
+
set amount(value: number) { this.__setNumber(1, value); }
|
|
1408
|
+
/**
|
|
1409
|
+
* `true` to flash the change.
|
|
1410
|
+
*
|
|
1411
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1412
|
+
*/
|
|
1413
|
+
get flash(): boolean { return this.__number(2) != 0; }
|
|
1414
|
+
set flash(value: boolean) { this.__setNumber(2, value ? 1 : 0); }
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* A part of the message of the day, the window a joining player sees.
|
|
1419
|
+
*
|
|
1420
|
+
* The game's `MOTD` message.
|
|
1421
|
+
*
|
|
1422
|
+
* Pawn: `register_message(get_user_msgid("MOTD"), ...)`
|
|
1423
|
+
*/
|
|
1424
|
+
export class MOTDMessage extends ClientMessage {
|
|
1425
|
+
private readonly kind: string = "MOTD";
|
|
1426
|
+
/**
|
|
1427
|
+
* `true` for the last part: the window opens.
|
|
1428
|
+
*
|
|
1429
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1430
|
+
*/
|
|
1431
|
+
get last(): boolean { return this.__number(1) != 0; }
|
|
1432
|
+
set last(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
1433
|
+
/**
|
|
1434
|
+
* The part's text.
|
|
1435
|
+
*
|
|
1436
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1437
|
+
*/
|
|
1438
|
+
get text(): string { return this.__text(2); }
|
|
1439
|
+
set text(value: string) { this.__setText(2, value); }
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* A player's night vision is turned on or off.
|
|
1444
|
+
*
|
|
1445
|
+
* The game's `NVGToggle` message.
|
|
1446
|
+
*
|
|
1447
|
+
* Pawn: `register_message(get_user_msgid("NVGToggle"), ...)`
|
|
1448
|
+
*/
|
|
1449
|
+
export class NVGToggleMessage extends ClientMessage {
|
|
1450
|
+
private readonly kind: string = "NVGToggle";
|
|
1451
|
+
/**
|
|
1452
|
+
* `true` while night vision is on.
|
|
1453
|
+
*
|
|
1454
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1455
|
+
*/
|
|
1456
|
+
get on(): boolean { return this.__number(1) != 0; }
|
|
1457
|
+
set on(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* A teammate on a player's radar.
|
|
1462
|
+
*
|
|
1463
|
+
* The game's `Radar` message.
|
|
1464
|
+
*
|
|
1465
|
+
* Pawn: `register_message(get_user_msgid("Radar"), ...)`
|
|
1466
|
+
*/
|
|
1467
|
+
export class RadarMessage extends ClientMessage {
|
|
1468
|
+
private readonly kind: string = "Radar";
|
|
1469
|
+
/**
|
|
1470
|
+
* The teammate shown.
|
|
1471
|
+
*
|
|
1472
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1473
|
+
*/
|
|
1474
|
+
get target(): Player | null { return this.__player(1); }
|
|
1475
|
+
set target(value: Player | null) { this.__setNumber(1, value != null ? value.id : 0); }
|
|
1476
|
+
/**
|
|
1477
|
+
* The point where the teammate is.
|
|
1478
|
+
*
|
|
1479
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1480
|
+
*/
|
|
1481
|
+
get origin(): Vector { return this.__vector(2); }
|
|
1482
|
+
set origin(value: number[]) { this.__setVector(2, value); }
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* The game asks a player's client for its state, for the voice.
|
|
1487
|
+
*
|
|
1488
|
+
* The game's `ReqState` message.
|
|
1489
|
+
*
|
|
1490
|
+
* Pawn: `register_message(get_user_msgid("ReqState"), ...)`
|
|
1491
|
+
*/
|
|
1492
|
+
export class ReqStateMessage extends ClientMessage {
|
|
1493
|
+
private readonly kind: string = "ReqState";
|
|
1057
1494
|
}
|
|
1058
1495
|
|
|
1059
1496
|
/**
|
|
1060
1497
|
* A player's HUD is reset, at his spawn.
|
|
1061
1498
|
*
|
|
1499
|
+
* The game's `ResetHUD` message.
|
|
1500
|
+
*
|
|
1062
1501
|
* Pawn: `register_message(get_user_msgid("ResetHUD"), ...)`
|
|
1063
1502
|
*/
|
|
1064
1503
|
export class ResetHUDMessage extends ClientMessage {
|
|
@@ -1068,6 +1507,8 @@ export class ResetHUDMessage extends ClientMessage {
|
|
|
1068
1507
|
/**
|
|
1069
1508
|
* The round clock at the top of a player's HUD is set.
|
|
1070
1509
|
*
|
|
1510
|
+
* The game's `RoundTime` message.
|
|
1511
|
+
*
|
|
1071
1512
|
* Pawn: `register_message(get_user_msgid("RoundTime"), ...)`
|
|
1072
1513
|
*/
|
|
1073
1514
|
export class RoundTimeMessage extends ClientMessage {
|
|
@@ -1084,6 +1525,8 @@ export class RoundTimeMessage extends ClientMessage {
|
|
|
1084
1525
|
/**
|
|
1085
1526
|
* A chat line.
|
|
1086
1527
|
*
|
|
1528
|
+
* The game's `SayText` message.
|
|
1529
|
+
*
|
|
1087
1530
|
* Pawn: `register_message(get_user_msgid("SayText"), ...)`
|
|
1088
1531
|
*/
|
|
1089
1532
|
export class SayTextMessage extends ClientMessage {
|
|
@@ -1102,11 +1545,77 @@ export class SayTextMessage extends ClientMessage {
|
|
|
1102
1545
|
*/
|
|
1103
1546
|
get text(): string { return this.__text(2); }
|
|
1104
1547
|
set text(value: string) { this.__setText(2, value); }
|
|
1548
|
+
/**
|
|
1549
|
+
* The texts put into the game's text in place of `%s1`, `%s2`, ... - e.g. a player's name. Assign to change them; their number stays.
|
|
1550
|
+
*
|
|
1551
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1552
|
+
*/
|
|
1553
|
+
get params(): string[] { return this.__texts(3); }
|
|
1554
|
+
set params(value: string[]) { this.__setTexts(3, value); }
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* The scenario icon on a player's HUD, such as the bomb's or a hostage's.
|
|
1559
|
+
*
|
|
1560
|
+
* The game's `Scenario` message.
|
|
1561
|
+
*
|
|
1562
|
+
* Pawn: `register_message(get_user_msgid("Scenario"), ...)`
|
|
1563
|
+
*/
|
|
1564
|
+
export class ScenarioMessage extends ClientMessage {
|
|
1565
|
+
private readonly kind: string = "Scenario";
|
|
1566
|
+
/**
|
|
1567
|
+
* `true` while the icon is shown.
|
|
1568
|
+
*
|
|
1569
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1570
|
+
*/
|
|
1571
|
+
get active(): boolean { return this.__number(1) != 0; }
|
|
1572
|
+
set active(value: boolean) { this.__setNumber(1, value ? 1 : 0); }
|
|
1573
|
+
/**
|
|
1574
|
+
* The icon's sprite name, e.g. `"hostage1"`.
|
|
1575
|
+
*
|
|
1576
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1577
|
+
*/
|
|
1578
|
+
get sprite(): string { return this.__text(2); }
|
|
1579
|
+
set sprite(value: string) { this.__setText(2, value); }
|
|
1580
|
+
/**
|
|
1581
|
+
* The icon's opacity, `0` to `255`.
|
|
1582
|
+
*
|
|
1583
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1584
|
+
*/
|
|
1585
|
+
get alpha(): number { return this.__number(3); }
|
|
1586
|
+
set alpha(value: number) { this.__setNumber(3, value); }
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* The marks the scoreboard shows beside a player: dead, the bomb, the VIP.
|
|
1591
|
+
*
|
|
1592
|
+
* The game's `ScoreAttrib` message.
|
|
1593
|
+
*
|
|
1594
|
+
* Pawn: `register_message(get_user_msgid("ScoreAttrib"), ...)`
|
|
1595
|
+
*/
|
|
1596
|
+
export class ScoreAttribMessage extends ClientMessage {
|
|
1597
|
+
private readonly kind: string = "ScoreAttrib";
|
|
1598
|
+
/**
|
|
1599
|
+
* The player whose row it is.
|
|
1600
|
+
*
|
|
1601
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1602
|
+
*/
|
|
1603
|
+
get target(): Player | null { return this.__player(1); }
|
|
1604
|
+
set target(value: Player | null) { this.__setNumber(1, value != null ? value.id : 0); }
|
|
1605
|
+
/**
|
|
1606
|
+
* The marks on the row, e.g. `"dead"`, `"bomb"`, `"vip"`.
|
|
1607
|
+
*
|
|
1608
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1609
|
+
*/
|
|
1610
|
+
get flags(): ScoreStatus[] { return <ScoreStatus[]>SCORE_STATUS.namesOf(<i32>this.__number(2)); }
|
|
1611
|
+
set flags(value: ScoreStatus[]) { this.__setNumber(2, SCORE_STATUS.maskOf(value)); }
|
|
1105
1612
|
}
|
|
1106
1613
|
|
|
1107
1614
|
/**
|
|
1108
1615
|
* A player's row on the scoreboard.
|
|
1109
1616
|
*
|
|
1617
|
+
* The game's `ScoreInfo` message.
|
|
1618
|
+
*
|
|
1110
1619
|
* Pawn: `register_message(get_user_msgid("ScoreInfo"), ...)`
|
|
1111
1620
|
*/
|
|
1112
1621
|
export class ScoreInfoMessage extends ClientMessage {
|
|
@@ -1141,9 +1650,96 @@ export class ScoreInfoMessage extends ClientMessage {
|
|
|
1141
1650
|
set team(value: Team) { this.__setNumber(5, max(MESSAGE_TEAMS.indexOf(value), 0)); }
|
|
1142
1651
|
}
|
|
1143
1652
|
|
|
1653
|
+
/**
|
|
1654
|
+
* A player's screen is coloured, fading in or out - a flashbang, a fade to black.
|
|
1655
|
+
*
|
|
1656
|
+
* The game's `ScreenFade` message.
|
|
1657
|
+
*
|
|
1658
|
+
* Pawn: `register_message(get_user_msgid("ScreenFade"), ...)`
|
|
1659
|
+
*/
|
|
1660
|
+
export class ScreenFadeMessage extends ClientMessage {
|
|
1661
|
+
private readonly kind: string = "ScreenFade";
|
|
1662
|
+
/**
|
|
1663
|
+
* The fade's duration, in seconds.
|
|
1664
|
+
*
|
|
1665
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1666
|
+
*/
|
|
1667
|
+
get duration(): number { return this.__number(1) / 4096.0; }
|
|
1668
|
+
set duration(value: number) { this.__setNumber(1, Math.round(value * 4096.0)); }
|
|
1669
|
+
/**
|
|
1670
|
+
* The time the full colour holds, in seconds.
|
|
1671
|
+
*
|
|
1672
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1673
|
+
*/
|
|
1674
|
+
get hold(): number { return this.__number(2) / 4096.0; }
|
|
1675
|
+
set hold(value: number) { this.__setNumber(2, Math.round(value * 4096.0)); }
|
|
1676
|
+
/**
|
|
1677
|
+
* One of `"in"`, from the colour to a clear view, or `"out"`, from a clear view to the colour.
|
|
1678
|
+
*
|
|
1679
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1680
|
+
*/
|
|
1681
|
+
get direction(): FadeDirection { return this.__bit(3, FFADE_OUT) ? "out" : "in"; }
|
|
1682
|
+
set direction(value: FadeDirection) { this.__setBit(3, FFADE_OUT, value == "out"); }
|
|
1683
|
+
/**
|
|
1684
|
+
* `true` when the colour tints the screen rather than painting over it.
|
|
1685
|
+
*
|
|
1686
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1687
|
+
*/
|
|
1688
|
+
get modulate(): boolean { return this.__bit(3, 2); }
|
|
1689
|
+
set modulate(value: boolean) { this.__setBit(3, 2, value); }
|
|
1690
|
+
/**
|
|
1691
|
+
* `true` when the colour stays until the next fade.
|
|
1692
|
+
*
|
|
1693
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1694
|
+
*/
|
|
1695
|
+
get stay(): boolean { return this.__bit(3, 4); }
|
|
1696
|
+
set stay(value: boolean) { this.__setBit(3, 4, value); }
|
|
1697
|
+
/**
|
|
1698
|
+
* The colour: red, green, blue and alpha, `0` to `255` each.
|
|
1699
|
+
*
|
|
1700
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
1701
|
+
*/
|
|
1702
|
+
get color(): number[] { return this.__bytes(4, 4); }
|
|
1703
|
+
set color(value: number[]) { this.__setBytes(4, value); }
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* A player's view shakes - an explosion nearby.
|
|
1708
|
+
*
|
|
1709
|
+
* The game's `ScreenShake` message.
|
|
1710
|
+
*
|
|
1711
|
+
* Pawn: `register_message(get_user_msgid("ScreenShake"), ...)`
|
|
1712
|
+
*/
|
|
1713
|
+
export class ScreenShakeMessage extends ClientMessage {
|
|
1714
|
+
private readonly kind: string = "ScreenShake";
|
|
1715
|
+
/**
|
|
1716
|
+
* The shake's strength: how far the view moves, up to 16 units.
|
|
1717
|
+
*
|
|
1718
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1719
|
+
*/
|
|
1720
|
+
get amplitude(): number { return this.__number(1) / 4096.0; }
|
|
1721
|
+
set amplitude(value: number) { this.__setNumber(1, Math.round(value * 4096.0)); }
|
|
1722
|
+
/**
|
|
1723
|
+
* The shake's duration, in seconds.
|
|
1724
|
+
*
|
|
1725
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1726
|
+
*/
|
|
1727
|
+
get duration(): number { return this.__number(2) / 4096.0; }
|
|
1728
|
+
set duration(value: number) { this.__setNumber(2, Math.round(value * 4096.0)); }
|
|
1729
|
+
/**
|
|
1730
|
+
* The shake's frequency, in jolts a second.
|
|
1731
|
+
*
|
|
1732
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1733
|
+
*/
|
|
1734
|
+
get frequency(): number { return this.__number(3) / 256.0; }
|
|
1735
|
+
set frequency(value: number) { this.__setNumber(3, Math.round(value * 256.0)); }
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1144
1738
|
/**
|
|
1145
1739
|
* A sound played to a player, such as a radio line.
|
|
1146
1740
|
*
|
|
1741
|
+
* The game's `SendAudio` message.
|
|
1742
|
+
*
|
|
1147
1743
|
* Pawn: `register_message(get_user_msgid("SendAudio"), ...)`
|
|
1148
1744
|
*/
|
|
1149
1745
|
export class SendAudioMessage extends ClientMessage {
|
|
@@ -1171,9 +1767,29 @@ export class SendAudioMessage extends ClientMessage {
|
|
|
1171
1767
|
set pitch(value: number) { this.__setNumber(3, value); }
|
|
1172
1768
|
}
|
|
1173
1769
|
|
|
1770
|
+
/**
|
|
1771
|
+
* The server's name a player's client shows.
|
|
1772
|
+
*
|
|
1773
|
+
* The game's `ServerName` message.
|
|
1774
|
+
*
|
|
1775
|
+
* Pawn: `register_message(get_user_msgid("ServerName"), ...)`
|
|
1776
|
+
*/
|
|
1777
|
+
export class ServerNameMessage extends ClientMessage {
|
|
1778
|
+
private readonly kind: string = "ServerName";
|
|
1779
|
+
/**
|
|
1780
|
+
* The server's name, as `hostname` sets it.
|
|
1781
|
+
*
|
|
1782
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1783
|
+
*/
|
|
1784
|
+
get serverName(): string { return this.__text(1); }
|
|
1785
|
+
set serverName(value: string) { this.__setText(1, value); }
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1174
1788
|
/**
|
|
1175
1789
|
* A player's field of view is set.
|
|
1176
1790
|
*
|
|
1791
|
+
* The game's `SetFOV` message.
|
|
1792
|
+
*
|
|
1177
1793
|
* Pawn: `register_message(get_user_msgid("SetFOV"), ...)`
|
|
1178
1794
|
*/
|
|
1179
1795
|
export class SetFOVMessage extends ClientMessage {
|
|
@@ -1187,9 +1803,97 @@ export class SetFOVMessage extends ClientMessage {
|
|
|
1187
1803
|
set fov(value: number) { this.__setNumber(1, value); }
|
|
1188
1804
|
}
|
|
1189
1805
|
|
|
1806
|
+
/**
|
|
1807
|
+
* A text menu on a player's screen - the team menu without VGUI, the radio, a plugin's menu.
|
|
1808
|
+
*
|
|
1809
|
+
* The game's `ShowMenu` message.
|
|
1810
|
+
*
|
|
1811
|
+
* Pawn: `register_message(get_user_msgid("ShowMenu"), ...)`
|
|
1812
|
+
*/
|
|
1813
|
+
export class ShowMenuMessage extends ClientMessage {
|
|
1814
|
+
private readonly kind: string = "ShowMenu";
|
|
1815
|
+
/**
|
|
1816
|
+
* `true` when more of the menu's text follows in the next message.
|
|
1817
|
+
*
|
|
1818
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1819
|
+
*/
|
|
1820
|
+
get more(): boolean { return this.__number(3) != 0; }
|
|
1821
|
+
set more(value: boolean) { this.__setNumber(3, value ? 1 : 0); }
|
|
1822
|
+
/**
|
|
1823
|
+
* The menu's text, or the game's own for it, e.g. `"#Team_Select"`.
|
|
1824
|
+
*
|
|
1825
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
1826
|
+
*/
|
|
1827
|
+
get text(): string { return this.__text(4); }
|
|
1828
|
+
set text(value: string) { this.__setText(4, value); }
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* The round clock appears on a player's HUD.
|
|
1833
|
+
*
|
|
1834
|
+
* The game's `ShowTimer` message.
|
|
1835
|
+
*
|
|
1836
|
+
* Pawn: `register_message(get_user_msgid("ShowTimer"), ...)`
|
|
1837
|
+
*/
|
|
1838
|
+
export class ShowTimerMessage extends ClientMessage {
|
|
1839
|
+
private readonly kind: string = "ShowTimer";
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* The health of the player a spectator watches.
|
|
1844
|
+
*
|
|
1845
|
+
* The game's `SpecHealth` and `SpecHealth2` messages.
|
|
1846
|
+
*
|
|
1847
|
+
* Pawn: `register_message(get_user_msgid("SpecHealth"), ...)`, `register_message(get_user_msgid("SpecHealth2"), ...)`
|
|
1848
|
+
*/
|
|
1849
|
+
export class SpecHealthMessage extends ClientMessage {
|
|
1850
|
+
private readonly kind: string = "SpecHealth";
|
|
1851
|
+
/**
|
|
1852
|
+
* The health shown.
|
|
1853
|
+
*
|
|
1854
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1855
|
+
*/
|
|
1856
|
+
get health(): number { return this.__number(1); }
|
|
1857
|
+
set health(value: number) { this.__setNumber(1, value); }
|
|
1858
|
+
/**
|
|
1859
|
+
* The player watched. `SpecHealth` does not carry it: there it reads as `null`, and writing it does nothing.
|
|
1860
|
+
*
|
|
1861
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1862
|
+
*/
|
|
1863
|
+
get target(): Player | null { return this.__player(2); }
|
|
1864
|
+
set target(value: Player | null) { this.__setNumber(2, value != null ? value.id : 0); }
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* A player becomes a spectator, or stops being one, on the scoreboard.
|
|
1869
|
+
*
|
|
1870
|
+
* The game's `Spectator` message.
|
|
1871
|
+
*
|
|
1872
|
+
* Pawn: `register_message(get_user_msgid("Spectator"), ...)`
|
|
1873
|
+
*/
|
|
1874
|
+
export class SpectatorMessage extends ClientMessage {
|
|
1875
|
+
private readonly kind: string = "Spectator";
|
|
1876
|
+
/**
|
|
1877
|
+
* The player.
|
|
1878
|
+
*
|
|
1879
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1880
|
+
*/
|
|
1881
|
+
get target(): Player | null { return this.__player(1); }
|
|
1882
|
+
set target(value: Player | null) { this.__setNumber(1, value != null ? value.id : 0); }
|
|
1883
|
+
/**
|
|
1884
|
+
* `true` while the player spectates.
|
|
1885
|
+
*
|
|
1886
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1887
|
+
*/
|
|
1888
|
+
get spectator(): boolean { return this.__number(2) != 0; }
|
|
1889
|
+
set spectator(value: boolean) { this.__setNumber(2, value ? 1 : 0); }
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1190
1892
|
/**
|
|
1191
1893
|
* A status icon on a player's HUD - the buy zone, the bomb - is shown, flashed or hidden.
|
|
1192
1894
|
*
|
|
1895
|
+
* The game's `StatusIcon` message.
|
|
1896
|
+
*
|
|
1193
1897
|
* Pawn: `register_message(get_user_msgid("StatusIcon"), ...)`
|
|
1194
1898
|
*/
|
|
1195
1899
|
export class StatusIconMessage extends ClientMessage {
|
|
@@ -1208,11 +1912,102 @@ export class StatusIconMessage extends ClientMessage {
|
|
|
1208
1912
|
*/
|
|
1209
1913
|
get sprite(): string { return this.__text(2); }
|
|
1210
1914
|
set sprite(value: string) { this.__setText(2, value); }
|
|
1915
|
+
/**
|
|
1916
|
+
* The icon's colour: red, green and blue, `0` to `255` each; empty when it is hidden.
|
|
1917
|
+
*
|
|
1918
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
1919
|
+
*/
|
|
1920
|
+
get color(): number[] { return this.__bytes(3, 3); }
|
|
1921
|
+
set color(value: number[]) { this.__setBytes(3, value); }
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* The status line at the bottom of a player's screen, such as the name of the player he aims at.
|
|
1926
|
+
*
|
|
1927
|
+
* The game's `StatusText` message.
|
|
1928
|
+
*
|
|
1929
|
+
* Pawn: `register_message(get_user_msgid("StatusText"), ...)`
|
|
1930
|
+
*/
|
|
1931
|
+
export class StatusTextMessage extends ClientMessage {
|
|
1932
|
+
private readonly kind: string = "StatusText";
|
|
1933
|
+
/**
|
|
1934
|
+
* The status line's number, from `0`.
|
|
1935
|
+
*
|
|
1936
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1937
|
+
*/
|
|
1938
|
+
get line(): number { return this.__number(1); }
|
|
1939
|
+
set line(value: number) { this.__setNumber(1, value); }
|
|
1940
|
+
/**
|
|
1941
|
+
* The line's text, or its format, e.g. `"1 %c1: %p2"`.
|
|
1942
|
+
*
|
|
1943
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1944
|
+
*/
|
|
1945
|
+
get text(): string { return this.__text(2); }
|
|
1946
|
+
set text(value: string) { this.__setText(2, value); }
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* A value the status line shows, such as the player a player aims at.
|
|
1951
|
+
*
|
|
1952
|
+
* The game's `StatusValue` message.
|
|
1953
|
+
*
|
|
1954
|
+
* Pawn: `register_message(get_user_msgid("StatusValue"), ...)`
|
|
1955
|
+
*/
|
|
1956
|
+
export class StatusValueMessage extends ClientMessage {
|
|
1957
|
+
private readonly kind: string = "StatusValue";
|
|
1958
|
+
/**
|
|
1959
|
+
* The value's number in the line's format: `1` a team, `2` a player, `3` health.
|
|
1960
|
+
*
|
|
1961
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1962
|
+
*/
|
|
1963
|
+
get slot(): number { return this.__number(1); }
|
|
1964
|
+
set slot(value: number) { this.__setNumber(1, value); }
|
|
1965
|
+
/**
|
|
1966
|
+
* The value.
|
|
1967
|
+
*
|
|
1968
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1969
|
+
*/
|
|
1970
|
+
get value(): number { return this.__number(2); }
|
|
1971
|
+
set value(value: number) { this.__setNumber(2, value); }
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* The countdown of a task on a player's HUD, such as rescuing the hostages in a career.
|
|
1976
|
+
*
|
|
1977
|
+
* The game's `TaskTime` message.
|
|
1978
|
+
*
|
|
1979
|
+
* Pawn: `register_message(get_user_msgid("TaskTime"), ...)`
|
|
1980
|
+
*/
|
|
1981
|
+
export class TaskTimeMessage extends ClientMessage {
|
|
1982
|
+
private readonly kind: string = "TaskTime";
|
|
1983
|
+
/**
|
|
1984
|
+
* The seconds left.
|
|
1985
|
+
*
|
|
1986
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
1987
|
+
*/
|
|
1988
|
+
get seconds(): number { return this.__number(1); }
|
|
1989
|
+
set seconds(value: number) { this.__setNumber(1, value); }
|
|
1990
|
+
/**
|
|
1991
|
+
* `true` while the clock runs.
|
|
1992
|
+
*
|
|
1993
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
1994
|
+
*/
|
|
1995
|
+
get active(): boolean { return this.__number(2) != 0; }
|
|
1996
|
+
set active(value: boolean) { this.__setNumber(2, value ? 1 : 0); }
|
|
1997
|
+
/**
|
|
1998
|
+
* The seconds the clock takes to fade out.
|
|
1999
|
+
*
|
|
2000
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
2001
|
+
*/
|
|
2002
|
+
get fade(): number { return this.__number(3); }
|
|
2003
|
+
set fade(value: number) { this.__setNumber(3, value); }
|
|
1211
2004
|
}
|
|
1212
2005
|
|
|
1213
2006
|
/**
|
|
1214
2007
|
* A player's team on the scoreboard.
|
|
1215
2008
|
*
|
|
2009
|
+
* The game's `TeamInfo` message.
|
|
2010
|
+
*
|
|
1216
2011
|
* Pawn: `register_message(get_user_msgid("TeamInfo"), ...)`
|
|
1217
2012
|
*/
|
|
1218
2013
|
export class TeamInfoMessage extends ClientMessage {
|
|
@@ -1225,17 +2020,44 @@ export class TeamInfoMessage extends ClientMessage {
|
|
|
1225
2020
|
get target(): Player | null { return this.__player(1); }
|
|
1226
2021
|
set target(value: Player | null) { this.__setNumber(1, value != null ? value.id : 0); }
|
|
1227
2022
|
/**
|
|
1228
|
-
* The team
|
|
2023
|
+
* The team, e.g. `"TERRORIST"`, `"CT"`.
|
|
1229
2024
|
*
|
|
1230
2025
|
* Pawn: `get_msg_arg_*(2)`
|
|
1231
2026
|
*/
|
|
1232
|
-
get team():
|
|
1233
|
-
set team(value:
|
|
2027
|
+
get team(): Team { return messageTeam(this.__text(2)); }
|
|
2028
|
+
set team(value: Team) { this.__setText(2, value); }
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* A team's score on the scoreboard.
|
|
2033
|
+
*
|
|
2034
|
+
* The game's `TeamScore` message.
|
|
2035
|
+
*
|
|
2036
|
+
* Pawn: `register_message(get_user_msgid("TeamScore"), ...)`
|
|
2037
|
+
*/
|
|
2038
|
+
export class TeamScoreMessage extends ClientMessage {
|
|
2039
|
+
private readonly kind: string = "TeamScore";
|
|
2040
|
+
/**
|
|
2041
|
+
* The team, `"TERRORIST"` or `"CT"`.
|
|
2042
|
+
*
|
|
2043
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
2044
|
+
*/
|
|
2045
|
+
get team(): Team { return messageTeam(this.__text(1)); }
|
|
2046
|
+
set team(value: Team) { this.__setText(1, value); }
|
|
2047
|
+
/**
|
|
2048
|
+
* The rounds the team has won.
|
|
2049
|
+
*
|
|
2050
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
2051
|
+
*/
|
|
2052
|
+
get score(): number { return this.__number(2); }
|
|
2053
|
+
set score(value: number) { this.__setNumber(2, value); }
|
|
1234
2054
|
}
|
|
1235
2055
|
|
|
1236
2056
|
/**
|
|
1237
2057
|
* A text from the game - an announcement, a hint - in chat, the console or the middle of the screen.
|
|
1238
2058
|
*
|
|
2059
|
+
* The game's `TextMsg` message.
|
|
2060
|
+
*
|
|
1239
2061
|
* Pawn: `register_message(get_user_msgid("TextMsg"), ...)`
|
|
1240
2062
|
*/
|
|
1241
2063
|
export class TextMsgMessage extends ClientMessage {
|
|
@@ -1254,11 +2076,145 @@ export class TextMsgMessage extends ClientMessage {
|
|
|
1254
2076
|
*/
|
|
1255
2077
|
get text(): string { return this.__text(2); }
|
|
1256
2078
|
set text(value: string) { this.__setText(2, value); }
|
|
2079
|
+
/**
|
|
2080
|
+
* The texts put into the game's text in place of `%s1`, `%s2`, ... - e.g. a player's name. Assign to change them; their number stays.
|
|
2081
|
+
*
|
|
2082
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
2083
|
+
*/
|
|
2084
|
+
get params(): string[] { return this.__texts(3); }
|
|
2085
|
+
set params(value: string[]) { this.__setTexts(3, value); }
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* The speed of the train a player drives, on his HUD.
|
|
2090
|
+
*
|
|
2091
|
+
* The game's `Train` message.
|
|
2092
|
+
*
|
|
2093
|
+
* Pawn: `register_message(get_user_msgid("Train"), ...)`
|
|
2094
|
+
*/
|
|
2095
|
+
export class TrainMessage extends ClientMessage {
|
|
2096
|
+
private readonly kind: string = "Train";
|
|
2097
|
+
/**
|
|
2098
|
+
* The speed step, `0` for none.
|
|
2099
|
+
*
|
|
2100
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
2101
|
+
*/
|
|
2102
|
+
get speed(): number { return this.__number(1); }
|
|
2103
|
+
set speed(value: number) { this.__setNumber(1, value); }
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* A tutor's message on a player's screen closes.
|
|
2108
|
+
*
|
|
2109
|
+
* The game's `TutorClose` message.
|
|
2110
|
+
*
|
|
2111
|
+
* Pawn: `register_message(get_user_msgid("TutorClose"), ...)`
|
|
2112
|
+
*/
|
|
2113
|
+
export class TutorCloseMessage extends ClientMessage {
|
|
2114
|
+
private readonly kind: string = "TutorClose";
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
/**
|
|
2118
|
+
* A VGUI menu of the game opens on a player's screen: the team menu, the class menu, the buy menu.
|
|
2119
|
+
*
|
|
2120
|
+
* The game's `VGUIMenu` message.
|
|
2121
|
+
*
|
|
2122
|
+
* Pawn: `register_message(get_user_msgid("VGUIMenu"), ...)`
|
|
2123
|
+
*/
|
|
2124
|
+
export class VGUIMenuMessage extends ClientMessage {
|
|
2125
|
+
private readonly kind: string = "VGUIMenu";
|
|
2126
|
+
/**
|
|
2127
|
+
* The menu, e.g. `"team"`, `"classT"`, `"buy"`.
|
|
2128
|
+
*
|
|
2129
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
2130
|
+
*/
|
|
2131
|
+
get menu(): VguiMenu { return vguiMenuName(<i32>this.__number(1)); }
|
|
2132
|
+
set menu(value: VguiMenu) { this.__setNumber(1, vguiMenuCell(value, <i32>this.__number(1))); }
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* A player's view goes back to first person.
|
|
2137
|
+
*
|
|
2138
|
+
* The game's `ViewMode` message.
|
|
2139
|
+
*
|
|
2140
|
+
* Pawn: `register_message(get_user_msgid("ViewMode"), ...)`
|
|
2141
|
+
*/
|
|
2142
|
+
export class ViewModeMessage extends ClientMessage {
|
|
2143
|
+
private readonly kind: string = "ViewMode";
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* A weapon's description for a player's client: its ammo, its slot, its place in the slot.
|
|
2148
|
+
*
|
|
2149
|
+
* The game's `WeaponList` message.
|
|
2150
|
+
*
|
|
2151
|
+
* Pawn: `register_message(get_user_msgid("WeaponList"), ...)`
|
|
2152
|
+
*/
|
|
2153
|
+
export class WeaponListMessage extends ClientMessage {
|
|
2154
|
+
private readonly kind: string = "WeaponList";
|
|
2155
|
+
/**
|
|
2156
|
+
* The weapon's class name, e.g. `"weapon_ak47"`.
|
|
2157
|
+
*
|
|
2158
|
+
* Pawn: `get_msg_arg_*(1)`
|
|
2159
|
+
*/
|
|
2160
|
+
get classname(): string { return this.__text(1); }
|
|
2161
|
+
set classname(value: string) { this.__setText(1, value); }
|
|
2162
|
+
/**
|
|
2163
|
+
* The index of the weapon's ammo in the game's list of kinds.
|
|
2164
|
+
*
|
|
2165
|
+
* Pawn: `get_msg_arg_*(2)`
|
|
2166
|
+
*/
|
|
2167
|
+
get ammo(): number { return this.__number(2); }
|
|
2168
|
+
set ammo(value: number) { this.__setNumber(2, value); }
|
|
2169
|
+
/**
|
|
2170
|
+
* The most of that ammo a player carries.
|
|
2171
|
+
*
|
|
2172
|
+
* Pawn: `get_msg_arg_*(3)`
|
|
2173
|
+
*/
|
|
2174
|
+
get maxAmmo(): number { return this.__number(3); }
|
|
2175
|
+
set maxAmmo(value: number) { this.__setNumber(3, value); }
|
|
2176
|
+
/**
|
|
2177
|
+
* The index of the weapon's second ammo, `-1` for none.
|
|
2178
|
+
*
|
|
2179
|
+
* Pawn: `get_msg_arg_*(4)`
|
|
2180
|
+
*/
|
|
2181
|
+
get ammo2(): number { return this.__number(4); }
|
|
2182
|
+
set ammo2(value: number) { this.__setNumber(4, value); }
|
|
2183
|
+
/**
|
|
2184
|
+
* The most of the second ammo a player carries.
|
|
2185
|
+
*
|
|
2186
|
+
* Pawn: `get_msg_arg_*(5)`
|
|
2187
|
+
*/
|
|
2188
|
+
get maxAmmo2(): number { return this.__number(5); }
|
|
2189
|
+
set maxAmmo2(value: number) { this.__setNumber(5, value); }
|
|
2190
|
+
/**
|
|
2191
|
+
* The slot the weapon is in, from `0`.
|
|
2192
|
+
*
|
|
2193
|
+
* Pawn: `get_msg_arg_*(6)`
|
|
2194
|
+
*/
|
|
2195
|
+
get slot(): number { return this.__number(6); }
|
|
2196
|
+
set slot(value: number) { this.__setNumber(6, value); }
|
|
2197
|
+
/**
|
|
2198
|
+
* The weapon's place in the slot, from `0`.
|
|
2199
|
+
*
|
|
2200
|
+
* Pawn: `get_msg_arg_*(7)`
|
|
2201
|
+
*/
|
|
2202
|
+
get position(): number { return this.__number(7); }
|
|
2203
|
+
set position(value: number) { this.__setNumber(7, value); }
|
|
2204
|
+
/**
|
|
2205
|
+
* The weapon, by its kind, e.g. `"ak47"`.
|
|
2206
|
+
*
|
|
2207
|
+
* Pawn: `get_msg_arg_*(8)`
|
|
2208
|
+
*/
|
|
2209
|
+
get weapon(): WeaponKind { return weaponKindOf(this.__number(8)); }
|
|
2210
|
+
set weapon(value: WeaponKind) { this.__setNumber(8, weaponIdOf(value)); }
|
|
1257
2211
|
}
|
|
1258
2212
|
|
|
1259
2213
|
/**
|
|
1260
2214
|
* A player picks up a weapon: the notice at the side of his screen.
|
|
1261
2215
|
*
|
|
2216
|
+
* The game's `WeapPickup` message.
|
|
2217
|
+
*
|
|
1262
2218
|
* Pawn: `register_message(get_user_msgid("WeapPickup"), ...)`
|
|
1263
2219
|
*/
|
|
1264
2220
|
export class WeapPickupMessage extends ClientMessage {
|
|
@@ -1272,7 +2228,7 @@ export class WeapPickupMessage extends ClientMessage {
|
|
|
1272
2228
|
set weapon(value: WeaponKind) { this.__setNumber(1, weaponIdOf(value)); }
|
|
1273
2229
|
}
|
|
1274
2230
|
|
|
1275
|
-
/** Every event a server raises, by name
|
|
2231
|
+
/** Every event a server raises, by name. */
|
|
1276
2232
|
export interface ServerEventMap {
|
|
1277
2233
|
/**
|
|
1278
2234
|
* The plugin has loaded: register commands, events and hooks here.
|
|
@@ -1280,84 +2236,42 @@ export interface ServerEventMap {
|
|
|
1280
2236
|
* Pawn: `plugin_init`
|
|
1281
2237
|
*/
|
|
1282
2238
|
init: PluginInitEvent;
|
|
1283
|
-
/**
|
|
1284
|
-
* The plugin has loaded: register commands, events and hooks here.
|
|
1285
|
-
*
|
|
1286
|
-
* Pawn: `plugin_init`
|
|
1287
|
-
*/
|
|
1288
|
-
plugin_init: PluginInitEvent;
|
|
1289
2239
|
/**
|
|
1290
2240
|
* An admin paused this plugin.
|
|
1291
2241
|
*
|
|
1292
2242
|
* Pawn: `plugin_pause`
|
|
1293
2243
|
*/
|
|
1294
2244
|
pause: PluginPauseEvent;
|
|
1295
|
-
/**
|
|
1296
|
-
* An admin paused this plugin.
|
|
1297
|
-
*
|
|
1298
|
-
* Pawn: `plugin_pause`
|
|
1299
|
-
*/
|
|
1300
|
-
plugin_pause: PluginPauseEvent;
|
|
1301
2245
|
/**
|
|
1302
2246
|
* An admin resumed this plugin.
|
|
1303
2247
|
*
|
|
1304
2248
|
* Pawn: `plugin_unpause`
|
|
1305
2249
|
*/
|
|
1306
2250
|
unpause: PluginUnpauseEvent;
|
|
1307
|
-
/**
|
|
1308
|
-
* An admin resumed this plugin.
|
|
1309
|
-
*
|
|
1310
|
-
* Pawn: `plugin_unpause`
|
|
1311
|
-
*/
|
|
1312
|
-
plugin_unpause: PluginUnpauseEvent;
|
|
1313
|
-
/**
|
|
1314
|
-
* The server is about to change the map.
|
|
1315
|
-
*
|
|
1316
|
-
* Pawn: `server_changelevel`
|
|
1317
|
-
*/
|
|
1318
|
-
changelevel: ServerChangelevelEvent;
|
|
1319
2251
|
/**
|
|
1320
2252
|
* The server is about to change the map.
|
|
1321
2253
|
*
|
|
1322
2254
|
* Pawn: `server_changelevel`
|
|
1323
2255
|
*/
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* Every config has been read and every plugin is loaded: the moment to read cvars and to create forwards other plugins listen to.
|
|
1327
|
-
*
|
|
1328
|
-
* Pawn: `plugin_cfg`
|
|
1329
|
-
*/
|
|
1330
|
-
cfg: PluginCfgEvent;
|
|
2256
|
+
changeLevel: ServerChangelevelEvent;
|
|
1331
2257
|
/**
|
|
1332
|
-
* Every
|
|
2258
|
+
* Every plugin has started: the moment to create forwards other plugins listen to. The configs run after it: read cvars in `"configsExecuted"`.
|
|
1333
2259
|
*
|
|
1334
|
-
* Pawn: `plugin_cfg`
|
|
1335
|
-
*/
|
|
1336
|
-
plugin_cfg: PluginCfgEvent;
|
|
1337
|
-
/**
|
|
1338
|
-
* The map is ending or the server is shutting down: save what has to survive.
|
|
1339
|
-
*
|
|
1340
|
-
* Pawn: `plugin_end`
|
|
2260
|
+
* Pawn: `plugin_cfg`
|
|
1341
2261
|
*/
|
|
1342
|
-
|
|
2262
|
+
pluginsLoaded: PluginCfgEvent;
|
|
1343
2263
|
/**
|
|
1344
2264
|
* The map is ending or the server is shutting down: save what has to survive.
|
|
1345
2265
|
*
|
|
1346
2266
|
* Pawn: `plugin_end`
|
|
1347
2267
|
*/
|
|
1348
|
-
|
|
2268
|
+
end: PluginEndEvent;
|
|
1349
2269
|
/**
|
|
1350
2270
|
* Called when a message is about to be logged.
|
|
1351
2271
|
*
|
|
1352
2272
|
* Pawn: `plugin_log`
|
|
1353
2273
|
*/
|
|
1354
2274
|
log: PluginLogEvent;
|
|
1355
|
-
/**
|
|
1356
|
-
* Called when a message is about to be logged.
|
|
1357
|
-
*
|
|
1358
|
-
* Pawn: `plugin_log`
|
|
1359
|
-
*/
|
|
1360
|
-
plugin_log: PluginLogEvent;
|
|
1361
2275
|
/**
|
|
1362
2276
|
* The map is loading: the only moment models, sounds and sprites can be precached.
|
|
1363
2277
|
*
|
|
@@ -1365,245 +2279,95 @@ export interface ServerEventMap {
|
|
|
1365
2279
|
*/
|
|
1366
2280
|
precache: PluginPrecacheEvent;
|
|
1367
2281
|
/**
|
|
1368
|
-
* The
|
|
1369
|
-
*
|
|
1370
|
-
* Pawn: `plugin_precache`
|
|
1371
|
-
*/
|
|
1372
|
-
plugin_precache: PluginPrecacheEvent;
|
|
1373
|
-
/**
|
|
1374
|
-
* A player changed his info, usually the name.
|
|
1375
|
-
*
|
|
1376
|
-
* Pawn: `client_infochanged`
|
|
1377
|
-
*/
|
|
1378
|
-
infochanged: ClientInfochangedEvent;
|
|
1379
|
-
/**
|
|
1380
|
-
* A player changed his info, usually the name.
|
|
1381
|
-
*
|
|
1382
|
-
* Pawn: `client_infochanged`
|
|
1383
|
-
*/
|
|
1384
|
-
client_infochanged: ClientInfochangedEvent;
|
|
1385
|
-
/**
|
|
1386
|
-
* A player started connecting. The player is not in the game yet: show him anything after `"putinserver"`.
|
|
2282
|
+
* A player started connecting. The player is not in the game yet: show him anything after `"putInServer"`.
|
|
1387
2283
|
*
|
|
1388
2284
|
* Pawn: `client_connect`
|
|
1389
2285
|
*/
|
|
1390
2286
|
connect: ClientConnectEvent;
|
|
1391
|
-
/**
|
|
1392
|
-
* A player started connecting. The player is not in the game yet: show him anything after `"putinserver"`.
|
|
1393
|
-
*
|
|
1394
|
-
* Pawn: `client_connect`
|
|
1395
|
-
*/
|
|
1396
|
-
client_connect: ClientConnectEvent;
|
|
1397
|
-
/**
|
|
1398
|
-
* A player started connecting, with a name and an address: the place to turn him away.
|
|
1399
|
-
*
|
|
1400
|
-
* Pawn: `client_connectex`
|
|
1401
|
-
*/
|
|
1402
|
-
connectex: ClientConnectexEvent;
|
|
1403
2287
|
/**
|
|
1404
2288
|
* A player started connecting, with a name and an address: the place to turn him away.
|
|
1405
2289
|
*
|
|
1406
2290
|
* Pawn: `client_connectex`
|
|
1407
2291
|
*/
|
|
1408
|
-
|
|
2292
|
+
connectAttempt: ClientConnectexEvent;
|
|
1409
2293
|
/**
|
|
1410
|
-
* A player's SteamID is known. May come before or after `"
|
|
2294
|
+
* A player's SteamID is known. May come before or after `"putInServer"`.
|
|
1411
2295
|
*
|
|
1412
2296
|
* Pawn: `client_authorized`
|
|
1413
2297
|
*/
|
|
1414
2298
|
authorized: ClientAuthorizedEvent;
|
|
1415
|
-
/**
|
|
1416
|
-
* A player's SteamID is known. May come before or after `"putinserver"`.
|
|
1417
|
-
*
|
|
1418
|
-
* Pawn: `client_authorized`
|
|
1419
|
-
*/
|
|
1420
|
-
client_authorized: ClientAuthorizedEvent;
|
|
1421
|
-
/**
|
|
1422
|
-
* Old form of `"disconnected"` that misses some cases: use `"disconnected"`.
|
|
1423
|
-
*
|
|
1424
|
-
* Pawn: `client_disconnect`
|
|
1425
|
-
*/
|
|
1426
|
-
disconnect: ClientDisconnectEvent;
|
|
1427
|
-
/**
|
|
1428
|
-
* Old form of `"disconnected"` that misses some cases: use `"disconnected"`.
|
|
1429
|
-
*
|
|
1430
|
-
* Pawn: `client_disconnect`
|
|
1431
|
-
*/
|
|
1432
|
-
client_disconnect: ClientDisconnectEvent;
|
|
1433
2299
|
/**
|
|
1434
2300
|
* A player left the server: quit, timed out or was kicked.
|
|
1435
2301
|
*
|
|
1436
2302
|
* Pawn: `client_disconnected`
|
|
1437
2303
|
*/
|
|
1438
2304
|
disconnected: ClientDisconnectedEvent;
|
|
1439
|
-
/**
|
|
1440
|
-
* A player left the server: quit, timed out or was kicked.
|
|
1441
|
-
*
|
|
1442
|
-
* Pawn: `client_disconnected`
|
|
1443
|
-
*/
|
|
1444
|
-
client_disconnected: ClientDisconnectedEvent;
|
|
1445
2305
|
/**
|
|
1446
2306
|
* A player's slot is being freed, after `"disconnected"`.
|
|
1447
2307
|
*
|
|
1448
2308
|
* Pawn: `client_remove`
|
|
1449
2309
|
*/
|
|
1450
2310
|
remove: ClientRemoveEvent;
|
|
1451
|
-
/**
|
|
1452
|
-
* A player's slot is being freed, after `"disconnected"`.
|
|
1453
|
-
*
|
|
1454
|
-
* Pawn: `client_remove`
|
|
1455
|
-
*/
|
|
1456
|
-
client_remove: ClientRemoveEvent;
|
|
1457
2311
|
/**
|
|
1458
2312
|
* A player sent a console command. For one command, `server.addCommand("name", handler)` is simpler.
|
|
1459
2313
|
*
|
|
1460
2314
|
* Pawn: `client_command`
|
|
1461
2315
|
*/
|
|
1462
2316
|
command: ClientCommandEvent;
|
|
1463
|
-
/**
|
|
1464
|
-
* A player sent a console command. For one command, `server.addCommand("name", handler)` is simpler.
|
|
1465
|
-
*
|
|
1466
|
-
* Pawn: `client_command`
|
|
1467
|
-
*/
|
|
1468
|
-
client_command: ClientCommandEvent;
|
|
1469
|
-
/**
|
|
1470
|
-
* A player has joined and is in the game: the moment to greet him.
|
|
1471
|
-
*
|
|
1472
|
-
* Pawn: `client_putinserver`
|
|
1473
|
-
*/
|
|
1474
|
-
putinserver: ClientPutinserverEvent;
|
|
1475
2317
|
/**
|
|
1476
2318
|
* A player has joined and is in the game: the moment to greet him.
|
|
1477
2319
|
*
|
|
1478
2320
|
* Pawn: `client_putinserver`
|
|
1479
2321
|
*/
|
|
1480
|
-
|
|
2322
|
+
putInServer: ClientPutinserverEvent;
|
|
1481
2323
|
/**
|
|
1482
2324
|
* Called when an inconsistent file is encountered by the engine.
|
|
1483
2325
|
*
|
|
1484
2326
|
* Pawn: `inconsistent_file`
|
|
1485
2327
|
*/
|
|
1486
2328
|
inconsistentFile: InconsistentFileEvent;
|
|
1487
|
-
/**
|
|
1488
|
-
* Called when an inconsistent file is encountered by the engine.
|
|
1489
|
-
*
|
|
1490
|
-
* Pawn: `inconsistent_file`
|
|
1491
|
-
*/
|
|
1492
|
-
inconsistent_file: InconsistentFileEvent;
|
|
1493
2329
|
/**
|
|
1494
2330
|
* Allows plugins to declare module dependencies using require_module()
|
|
1495
2331
|
*
|
|
1496
2332
|
* Pawn: `plugin_modules`
|
|
1497
2333
|
*/
|
|
1498
2334
|
modules: PluginModulesEvent;
|
|
1499
|
-
/**
|
|
1500
|
-
* Allows plugins to declare module dependencies using require_module()
|
|
1501
|
-
*
|
|
1502
|
-
* Pawn: `plugin_modules`
|
|
1503
|
-
*/
|
|
1504
|
-
plugin_modules: PluginModulesEvent;
|
|
1505
2335
|
/**
|
|
1506
2336
|
* Called when the map has loaded, and all configs are done executing. This includes servercfgfile (server.cfg), amxx.cfg, plugin's config, and per-map config.
|
|
1507
2337
|
*
|
|
1508
2338
|
* Pawn: `OnConfigsExecuted`
|
|
1509
2339
|
*/
|
|
1510
|
-
|
|
2340
|
+
configsExecuted: OnConfigsExecutedEvent;
|
|
1511
2341
|
/**
|
|
1512
2342
|
* Called when the map has loaded, right after plugin_cfg() but any time before OnConfigsExecuted. It's called after amxx.cfg and all AutoExecConfig() exec commands have been added to the server command buffer.
|
|
1513
2343
|
*
|
|
1514
2344
|
* Pawn: `OnAutoConfigsBuffered`
|
|
1515
2345
|
*/
|
|
1516
|
-
|
|
2346
|
+
configsQueued: OnAutoConfigsBufferedEvent;
|
|
1517
2347
|
/**
|
|
1518
2348
|
* Called when CS internally fires a command to a player.
|
|
1519
2349
|
*
|
|
1520
2350
|
* Pawn: `CS_InternalCommand`
|
|
1521
2351
|
*/
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* Called when a client attempts to purchase an item.
|
|
1525
|
-
*
|
|
1526
|
-
* Pawn: `CS_OnBuyAttempt`
|
|
1527
|
-
*/
|
|
1528
|
-
CS_OnBuyAttempt: CS_OnBuyAttemptEvent;
|
|
1529
|
-
/**
|
|
1530
|
-
* Called when a client purchases an item.
|
|
1531
|
-
*
|
|
1532
|
-
* Pawn: `CS_OnBuy`
|
|
1533
|
-
*/
|
|
1534
|
-
CS_OnBuy: CS_OnBuyEvent;
|
|
1535
|
-
/**
|
|
1536
|
-
* Two entities touched.
|
|
1537
|
-
*
|
|
1538
|
-
* Pawn: `pfn_touch`
|
|
1539
|
-
*/
|
|
1540
|
-
pfnTouch: PfnTouchEvent;
|
|
1541
|
-
/**
|
|
1542
|
-
* Two entities touched.
|
|
1543
|
-
*
|
|
1544
|
-
* Pawn: `pfn_touch`
|
|
1545
|
-
*/
|
|
1546
|
-
pfn_touch: PfnTouchEvent;
|
|
2352
|
+
internalCommand: CS_InternalCommandEvent;
|
|
1547
2353
|
/**
|
|
1548
2354
|
* A server frame, hundreds of times a second. Keep the listener tiny, or use `setInterval`.
|
|
1549
2355
|
*
|
|
1550
2356
|
* Pawn: `server_frame`
|
|
1551
2357
|
*/
|
|
1552
2358
|
frame: ServerFrameEvent;
|
|
1553
|
-
/**
|
|
1554
|
-
* A server frame, hundreds of times a second. Keep the listener tiny, or use `setInterval`.
|
|
1555
|
-
*
|
|
1556
|
-
* Pawn: `server_frame`
|
|
1557
|
-
*/
|
|
1558
|
-
server_frame: ServerFrameEvent;
|
|
1559
|
-
/**
|
|
1560
|
-
* A player typed `"kill"` in the console to kill himself.
|
|
1561
|
-
*
|
|
1562
|
-
* Pawn: `client_kill`
|
|
1563
|
-
*/
|
|
1564
|
-
kill: ClientKillEvent;
|
|
1565
2359
|
/**
|
|
1566
2360
|
* A player typed `"kill"` in the console to kill himself.
|
|
1567
2361
|
*
|
|
1568
2362
|
* Pawn: `client_kill`
|
|
1569
2363
|
*/
|
|
1570
|
-
|
|
1571
|
-
/**
|
|
1572
|
-
* Called at the start of each client think.
|
|
1573
|
-
*
|
|
1574
|
-
* Pawn: `client_PreThink`
|
|
1575
|
-
*/
|
|
1576
|
-
PreThink: Client_PreThinkEvent;
|
|
1577
|
-
/**
|
|
1578
|
-
* Called at the start of each client think.
|
|
1579
|
-
*
|
|
1580
|
-
* Pawn: `client_PreThink`
|
|
1581
|
-
*/
|
|
1582
|
-
client_PreThink: Client_PreThinkEvent;
|
|
1583
|
-
/**
|
|
1584
|
-
* Called after each client think.
|
|
1585
|
-
*
|
|
1586
|
-
* Pawn: `client_PostThink`
|
|
1587
|
-
*/
|
|
1588
|
-
PostThink: Client_PostThinkEvent;
|
|
1589
|
-
/**
|
|
1590
|
-
* Called after each client think.
|
|
1591
|
-
*
|
|
1592
|
-
* Pawn: `client_PostThink`
|
|
1593
|
-
*/
|
|
1594
|
-
client_PostThink: Client_PostThinkEvent;
|
|
2364
|
+
suicide: ClientKillEvent;
|
|
1595
2365
|
/**
|
|
1596
2366
|
* A player sent an impulse: `100` is the flashlight, `201` the spray.
|
|
1597
2367
|
*
|
|
1598
2368
|
* Pawn: `client_impulse`
|
|
1599
2369
|
*/
|
|
1600
2370
|
impulse: ClientImpulseEvent;
|
|
1601
|
-
/**
|
|
1602
|
-
* A player sent an impulse: `100` is the flashlight, `201` the spray.
|
|
1603
|
-
*
|
|
1604
|
-
* Pawn: `client_impulse`
|
|
1605
|
-
*/
|
|
1606
|
-
client_impulse: ClientImpulseEvent;
|
|
1607
2371
|
/**
|
|
1608
2372
|
* Called for CmdStart() on a client.
|
|
1609
2373
|
*
|
|
@@ -1611,557 +2375,745 @@ export interface ServerEventMap {
|
|
|
1611
2375
|
*/
|
|
1612
2376
|
cmdStart: ClientCmdStartEvent;
|
|
1613
2377
|
/**
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
1616
|
-
* Pawn: `client_cmdStart`
|
|
1617
|
-
*/
|
|
1618
|
-
client_cmdStart: ClientCmdStartEvent;
|
|
1619
|
-
/**
|
|
1620
|
-
* An entity thinks: its scheduled update has come.
|
|
2378
|
+
* An entity thinks: its scheduled update has come. Any entity's; one class's is `game.addEventListener("think", listener, { classname })`.
|
|
1621
2379
|
*
|
|
1622
2380
|
* Pawn: `pfn_think`
|
|
1623
2381
|
*/
|
|
1624
|
-
|
|
1625
|
-
/**
|
|
1626
|
-
* An entity thinks: its scheduled update has come.
|
|
1627
|
-
*
|
|
1628
|
-
* Pawn: `pfn_think`
|
|
1629
|
-
*/
|
|
1630
|
-
pfn_think: PfnThinkEvent;
|
|
1631
|
-
/**
|
|
1632
|
-
* The engine plays an event to the clients: a shot, a weapon's sound and effects.
|
|
1633
|
-
*
|
|
1634
|
-
* Pawn: `pfn_playbackevent`
|
|
1635
|
-
*/
|
|
1636
|
-
pfnPlaybackevent: PfnPlaybackeventEvent;
|
|
2382
|
+
entityThink: PfnThinkEvent;
|
|
1637
2383
|
/**
|
|
1638
2384
|
* The engine plays an event to the clients: a shot, a weapon's sound and effects.
|
|
1639
2385
|
*
|
|
1640
2386
|
* Pawn: `pfn_playbackevent`
|
|
1641
2387
|
*/
|
|
1642
|
-
|
|
1643
|
-
/**
|
|
1644
|
-
* Called when a keyvalue pair is sent to an entity.
|
|
1645
|
-
*
|
|
1646
|
-
* Pawn: `pfn_keyvalue`
|
|
1647
|
-
*/
|
|
1648
|
-
pfnKeyvalue: PfnKeyvalueEvent;
|
|
2388
|
+
playbackEvent: PfnPlaybackeventEvent;
|
|
1649
2389
|
/**
|
|
1650
2390
|
* Called when a keyvalue pair is sent to an entity.
|
|
1651
2391
|
*
|
|
1652
2392
|
* Pawn: `pfn_keyvalue`
|
|
1653
2393
|
*/
|
|
1654
|
-
|
|
1655
|
-
/**
|
|
1656
|
-
* An entity is being spawned on the map.
|
|
1657
|
-
*
|
|
1658
|
-
* Pawn: `pfn_spawn`
|
|
1659
|
-
*/
|
|
1660
|
-
pfnSpawn: PfnSpawnEvent;
|
|
2394
|
+
keyValue: PfnKeyvalueEvent;
|
|
1661
2395
|
/**
|
|
1662
|
-
* An entity is being spawned on the map.
|
|
2396
|
+
* An entity is being spawned on the map, the map's own too as it loads. A player's spawn is `game.addEventListener("spawn", listener)`.
|
|
1663
2397
|
*
|
|
1664
2398
|
* Pawn: `pfn_spawn`
|
|
1665
2399
|
*/
|
|
1666
|
-
|
|
2400
|
+
entitySpawn: PfnSpawnEvent;
|
|
1667
2401
|
/** A field plugins added to `Player` changed on a player; `{ field: "spawnProtected" }` hears one field. */
|
|
1668
|
-
|
|
2402
|
+
playerChange: PlayerChangeEvent;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
/** Every message the server sends its clients, by the name server.addMessageListener takes. */
|
|
2406
|
+
export interface ServerMessageMap {
|
|
1669
2407
|
/**
|
|
1670
|
-
* A
|
|
2408
|
+
* A player's HUD stops showing the round's advertisement.
|
|
2409
|
+
*
|
|
2410
|
+
* The game's `ADStop` message.
|
|
1671
2411
|
*
|
|
1672
2412
|
* Pawn: `register_message(get_user_msgid("ADStop"), ...)`
|
|
1673
2413
|
*/
|
|
1674
|
-
|
|
2414
|
+
adStop: ADStopMessage;
|
|
1675
2415
|
/**
|
|
1676
|
-
*
|
|
2416
|
+
* Whether a player may pick Spectate in the team menu.
|
|
2417
|
+
*
|
|
2418
|
+
* The game's `AllowSpec` message.
|
|
1677
2419
|
*
|
|
1678
2420
|
* Pawn: `register_message(get_user_msgid("AllowSpec"), ...)`
|
|
1679
2421
|
*/
|
|
1680
|
-
|
|
2422
|
+
allowSpectate: AllowSpecMessage;
|
|
1681
2423
|
/**
|
|
1682
2424
|
* A player picks up ammo: the notice at the side of his screen.
|
|
1683
2425
|
*
|
|
2426
|
+
* The game's `AmmoPickup` message.
|
|
2427
|
+
*
|
|
1684
2428
|
* Pawn: `register_message(get_user_msgid("AmmoPickup"), ...)`
|
|
1685
2429
|
*/
|
|
1686
|
-
|
|
2430
|
+
ammoPickup: AmmoPickupMessage;
|
|
1687
2431
|
/**
|
|
1688
|
-
* A
|
|
2432
|
+
* A player's reserve ammo of one kind on his HUD changes.
|
|
2433
|
+
*
|
|
2434
|
+
* The game's `AmmoX` message.
|
|
1689
2435
|
*
|
|
1690
2436
|
* Pawn: `register_message(get_user_msgid("AmmoX"), ...)`
|
|
1691
2437
|
*/
|
|
1692
|
-
|
|
2438
|
+
ammo: AmmoXMessage;
|
|
1693
2439
|
/**
|
|
1694
|
-
*
|
|
2440
|
+
* The armour icon on a player's HUD: a vest, or a vest and a helmet.
|
|
2441
|
+
*
|
|
2442
|
+
* The game's `ArmorType` message.
|
|
1695
2443
|
*
|
|
1696
2444
|
* Pawn: `register_message(get_user_msgid("ArmorType"), ...)`
|
|
1697
2445
|
*/
|
|
1698
|
-
|
|
2446
|
+
armorType: ArmorTypeMessage;
|
|
1699
2447
|
/**
|
|
1700
|
-
* The progress bar in the middle of a player's screen is shown or hidden.
|
|
2448
|
+
* The progress bar in the middle of a player's screen is shown or hidden, from empty or part of the way full.
|
|
1701
2449
|
*
|
|
1702
|
-
*
|
|
1703
|
-
*/
|
|
1704
|
-
"message:BarTime": BarTimeMessage;
|
|
1705
|
-
/**
|
|
1706
|
-
* A message the server sends its clients; its arguments are `event.args`.
|
|
2450
|
+
* The game's `BarTime` and `BarTime2` messages.
|
|
1707
2451
|
*
|
|
1708
|
-
* Pawn: `register_message(get_user_msgid("BarTime2"), ...)`
|
|
2452
|
+
* Pawn: `register_message(get_user_msgid("BarTime"), ...)`, `register_message(get_user_msgid("BarTime2"), ...)`
|
|
1709
2453
|
*/
|
|
1710
|
-
|
|
2454
|
+
progressBar: BarTimeMessage;
|
|
1711
2455
|
/**
|
|
1712
2456
|
* A player's armour on his HUD changes.
|
|
1713
2457
|
*
|
|
2458
|
+
* The game's `Battery` message.
|
|
2459
|
+
*
|
|
1714
2460
|
* Pawn: `register_message(get_user_msgid("Battery"), ...)`
|
|
1715
2461
|
*/
|
|
1716
|
-
|
|
2462
|
+
armor: BatteryMessage;
|
|
1717
2463
|
/**
|
|
1718
|
-
* A
|
|
2464
|
+
* A player's money on his HUD blinks: he cannot afford what he tried to buy.
|
|
2465
|
+
*
|
|
2466
|
+
* The game's `BlinkAcct` message.
|
|
1719
2467
|
*
|
|
1720
2468
|
* Pawn: `register_message(get_user_msgid("BlinkAcct"), ...)`
|
|
1721
2469
|
*/
|
|
1722
|
-
|
|
2470
|
+
moneyBlink: BlinkAcctMessage;
|
|
1723
2471
|
/**
|
|
1724
|
-
*
|
|
2472
|
+
* The bomb on the terrorists' radar: dropped or planted.
|
|
2473
|
+
*
|
|
2474
|
+
* The game's `BombDrop` message.
|
|
1725
2475
|
*
|
|
1726
2476
|
* Pawn: `register_message(get_user_msgid("BombDrop"), ...)`
|
|
1727
2477
|
*/
|
|
1728
|
-
|
|
2478
|
+
bombDrop: BombDropMessage;
|
|
1729
2479
|
/**
|
|
1730
|
-
*
|
|
2480
|
+
* The bomb is picked up: it leaves the terrorists' radar.
|
|
2481
|
+
*
|
|
2482
|
+
* The game's `BombPickup` message.
|
|
1731
2483
|
*
|
|
1732
2484
|
* Pawn: `register_message(get_user_msgid("BombPickup"), ...)`
|
|
1733
2485
|
*/
|
|
1734
|
-
|
|
2486
|
+
bombPickup: BombPickupMessage;
|
|
1735
2487
|
/**
|
|
1736
|
-
*
|
|
2488
|
+
* The progress bar a player's client shows while the bots learn a new map. Its arguments are read by place, through `event.args`.
|
|
2489
|
+
*
|
|
2490
|
+
* The game's `BotProgress` message.
|
|
1737
2491
|
*
|
|
1738
2492
|
* Pawn: `register_message(get_user_msgid("BotProgress"), ...)`
|
|
1739
2493
|
*/
|
|
1740
|
-
|
|
2494
|
+
botProgress: ClientMessage;
|
|
1741
2495
|
/**
|
|
1742
|
-
*
|
|
2496
|
+
* The voice icon over a bot who talks on the radio.
|
|
2497
|
+
*
|
|
2498
|
+
* The game's `BotVoice` message.
|
|
1743
2499
|
*
|
|
1744
2500
|
* Pawn: `register_message(get_user_msgid("BotVoice"), ...)`
|
|
1745
2501
|
*/
|
|
1746
|
-
|
|
2502
|
+
botVoice: BotVoiceMessage;
|
|
1747
2503
|
/**
|
|
1748
|
-
* A
|
|
2504
|
+
* A spent shell a weapon throws out, for the clients to draw. Its arguments are read by place, through `event.args`.
|
|
2505
|
+
*
|
|
2506
|
+
* The game's `Brass` message.
|
|
1749
2507
|
*
|
|
1750
2508
|
* Pawn: `register_message(get_user_msgid("Brass"), ...)`
|
|
1751
2509
|
*/
|
|
1752
|
-
|
|
2510
|
+
shellCasing: ClientMessage;
|
|
1753
2511
|
/**
|
|
1754
|
-
* A
|
|
2512
|
+
* A player's buy menu is closed.
|
|
2513
|
+
*
|
|
2514
|
+
* The game's `BuyClose` message.
|
|
1755
2515
|
*
|
|
1756
2516
|
* Pawn: `register_message(get_user_msgid("BuyClose"), ...)`
|
|
1757
2517
|
*/
|
|
1758
|
-
|
|
2518
|
+
closeBuyMenu: BuyCloseMessage;
|
|
1759
2519
|
/**
|
|
1760
2520
|
* A dead player's body is left on the ground for the clients to draw.
|
|
1761
2521
|
*
|
|
2522
|
+
* The game's `ClCorpse` message.
|
|
2523
|
+
*
|
|
1762
2524
|
* Pawn: `register_message(get_user_msgid("ClCorpse"), ...)`
|
|
1763
2525
|
*/
|
|
1764
|
-
|
|
2526
|
+
corpse: ClCorpseMessage;
|
|
1765
2527
|
/**
|
|
1766
|
-
*
|
|
2528
|
+
* Counter-Strike's own crosshair on a player's screen is shown or hidden.
|
|
2529
|
+
*
|
|
2530
|
+
* The game's `Crosshair` message.
|
|
1767
2531
|
*
|
|
1768
2532
|
* Pawn: `register_message(get_user_msgid("Crosshair"), ...)`
|
|
1769
2533
|
*/
|
|
1770
|
-
|
|
2534
|
+
crosshair: CrosshairMessage;
|
|
1771
2535
|
/**
|
|
1772
2536
|
* The weapon in a player's hands and its clip on his HUD.
|
|
1773
2537
|
*
|
|
2538
|
+
* The game's `CurWeapon` message.
|
|
2539
|
+
*
|
|
1774
2540
|
* Pawn: `register_message(get_user_msgid("CurWeapon"), ...)`
|
|
1775
2541
|
*/
|
|
1776
|
-
|
|
2542
|
+
currentWeapon: CurWeaponMessage;
|
|
1777
2543
|
/**
|
|
1778
|
-
* A
|
|
2544
|
+
* A step of Condition Zero's career, its single-player campaign. Its arguments are read by place, through `event.args`.
|
|
2545
|
+
*
|
|
2546
|
+
* The game's `CZCareer` message.
|
|
1779
2547
|
*
|
|
1780
2548
|
* Pawn: `register_message(get_user_msgid("CZCareer"), ...)`
|
|
1781
2549
|
*/
|
|
1782
|
-
|
|
2550
|
+
czCareer: ClientMessage;
|
|
1783
2551
|
/**
|
|
1784
|
-
*
|
|
2552
|
+
* Condition Zero's career on a player's HUD. Its arguments are read by place, through `event.args`.
|
|
2553
|
+
*
|
|
2554
|
+
* The game's `CZCareerHUD` message.
|
|
1785
2555
|
*
|
|
1786
2556
|
* Pawn: `register_message(get_user_msgid("CZCareerHUD"), ...)`
|
|
1787
2557
|
*/
|
|
1788
|
-
|
|
2558
|
+
czCareerHud: ClientMessage;
|
|
1789
2559
|
/**
|
|
1790
2560
|
* A player is shown the damage he took: the red marks at the side of his screen.
|
|
1791
2561
|
*
|
|
2562
|
+
* The game's `Damage` message.
|
|
2563
|
+
*
|
|
1792
2564
|
* Pawn: `register_message(get_user_msgid("Damage"), ...)`
|
|
1793
2565
|
*/
|
|
1794
|
-
|
|
2566
|
+
damage: DamageMessage;
|
|
1795
2567
|
/**
|
|
1796
2568
|
* A kill in the top right corner of every screen.
|
|
1797
2569
|
*
|
|
2570
|
+
* The game's `DeathMsg` message.
|
|
2571
|
+
*
|
|
1798
2572
|
* Pawn: `register_message(get_user_msgid("DeathMsg"), ...)`
|
|
1799
2573
|
*/
|
|
1800
|
-
|
|
2574
|
+
death: DeathMsgMessage;
|
|
1801
2575
|
/**
|
|
1802
|
-
*
|
|
2576
|
+
* The flashlight icon on a player's HUD: on or off, and its battery.
|
|
2577
|
+
*
|
|
2578
|
+
* The game's `Flashlight` message.
|
|
1803
2579
|
*
|
|
1804
2580
|
* Pawn: `register_message(get_user_msgid("Flashlight"), ...)`
|
|
1805
2581
|
*/
|
|
1806
|
-
|
|
2582
|
+
flashlight: FlashlightMessage;
|
|
1807
2583
|
/**
|
|
1808
|
-
*
|
|
2584
|
+
* The flashlight's battery on a player's HUD changes.
|
|
2585
|
+
*
|
|
2586
|
+
* The game's `FlashBat` message.
|
|
1809
2587
|
*
|
|
1810
2588
|
* Pawn: `register_message(get_user_msgid("FlashBat"), ...)`
|
|
1811
2589
|
*/
|
|
1812
|
-
|
|
2590
|
+
flashlightBattery: FlashBatMessage;
|
|
1813
2591
|
/**
|
|
1814
|
-
*
|
|
2592
|
+
* The fog on a player's screen: its colour and density. Its arguments are read by place, through `event.args`.
|
|
2593
|
+
*
|
|
2594
|
+
* The game's `Fog` message.
|
|
1815
2595
|
*
|
|
1816
2596
|
* Pawn: `register_message(get_user_msgid("Fog"), ...)`
|
|
1817
2597
|
*/
|
|
1818
|
-
|
|
2598
|
+
fog: ClientMessage;
|
|
1819
2599
|
/**
|
|
1820
|
-
*
|
|
2600
|
+
* The views a dead player may watch the game in, as `mp_forcecamera` and `mp_forcechasecam` allow. Its arguments are read by place, through `event.args`.
|
|
2601
|
+
*
|
|
2602
|
+
* The game's `ForceCam` message.
|
|
1821
2603
|
*
|
|
1822
2604
|
* Pawn: `register_message(get_user_msgid("ForceCam"), ...)`
|
|
1823
2605
|
*/
|
|
1824
|
-
|
|
2606
|
+
forceCamera: ClientMessage;
|
|
1825
2607
|
/**
|
|
1826
|
-
*
|
|
2608
|
+
* Whether the game is played in teams, for a player's client. Its arguments are read by place, through `event.args`.
|
|
2609
|
+
*
|
|
2610
|
+
* The game's `GameMode` message.
|
|
1827
2611
|
*
|
|
1828
2612
|
* Pawn: `register_message(get_user_msgid("GameMode"), ...)`
|
|
1829
2613
|
*/
|
|
1830
|
-
|
|
2614
|
+
gameMode: ClientMessage;
|
|
1831
2615
|
/**
|
|
1832
|
-
*
|
|
2616
|
+
* The game's title on a player's screen when he enters the game. Its arguments are read by place, through `event.args`.
|
|
2617
|
+
*
|
|
2618
|
+
* The game's `GameTitle` message.
|
|
1833
2619
|
*
|
|
1834
2620
|
* Pawn: `register_message(get_user_msgid("GameTitle"), ...)`
|
|
1835
2621
|
*/
|
|
1836
|
-
|
|
2622
|
+
gameTitle: ClientMessage;
|
|
1837
2623
|
/**
|
|
1838
|
-
*
|
|
2624
|
+
* The Geiger counter's clicks a player hears near radiation.
|
|
2625
|
+
*
|
|
2626
|
+
* The game's `Geiger` message.
|
|
1839
2627
|
*
|
|
1840
2628
|
* Pawn: `register_message(get_user_msgid("Geiger"), ...)`
|
|
1841
2629
|
*/
|
|
1842
|
-
|
|
2630
|
+
geiger: GeigerMessage;
|
|
1843
2631
|
/**
|
|
1844
2632
|
* A player's health on his HUD changes.
|
|
1845
2633
|
*
|
|
2634
|
+
* The game's `Health` message.
|
|
2635
|
+
*
|
|
1846
2636
|
* Pawn: `register_message(get_user_msgid("Health"), ...)`
|
|
1847
2637
|
*/
|
|
1848
|
-
|
|
2638
|
+
health: HealthMessage;
|
|
1849
2639
|
/**
|
|
1850
2640
|
* The parts of a player's HUD that are hidden change.
|
|
1851
2641
|
*
|
|
2642
|
+
* The game's `HideWeapon` message.
|
|
2643
|
+
*
|
|
1852
2644
|
* Pawn: `register_message(get_user_msgid("HideWeapon"), ...)`
|
|
1853
2645
|
*/
|
|
1854
|
-
|
|
2646
|
+
hideWeapon: HideWeaponMessage;
|
|
1855
2647
|
/**
|
|
1856
|
-
* A
|
|
2648
|
+
* A note to the HLTV proxies, such as a new round's start. Its arguments are read by place, through `event.args`.
|
|
2649
|
+
*
|
|
2650
|
+
* The game's `HLTV` message.
|
|
1857
2651
|
*
|
|
1858
2652
|
* Pawn: `register_message(get_user_msgid("HLTV"), ...)`
|
|
1859
2653
|
*/
|
|
1860
|
-
|
|
2654
|
+
hltv: ClientMessage;
|
|
1861
2655
|
/**
|
|
1862
|
-
* A
|
|
2656
|
+
* A hostage is killed: it leaves the counter-terrorists' radar.
|
|
2657
|
+
*
|
|
2658
|
+
* The game's `HostageK` message.
|
|
1863
2659
|
*
|
|
1864
2660
|
* Pawn: `register_message(get_user_msgid("HostageK"), ...)`
|
|
1865
2661
|
*/
|
|
1866
|
-
|
|
2662
|
+
hostageKilled: HostageKMessage;
|
|
1867
2663
|
/**
|
|
1868
|
-
* A
|
|
2664
|
+
* A hostage on the counter-terrorists' radar.
|
|
2665
|
+
*
|
|
2666
|
+
* The game's `HostagePos` message.
|
|
1869
2667
|
*
|
|
1870
2668
|
* Pawn: `register_message(get_user_msgid("HostagePos"), ...)`
|
|
1871
2669
|
*/
|
|
1872
|
-
|
|
2670
|
+
hostagePosition: HostagePosMessage;
|
|
1873
2671
|
/**
|
|
1874
|
-
* A
|
|
2672
|
+
* A hint in the middle of a player's screen.
|
|
1875
2673
|
*
|
|
1876
|
-
*
|
|
1877
|
-
*/
|
|
1878
|
-
"message:HudText": ClientMessage;
|
|
1879
|
-
/**
|
|
1880
|
-
* A hint in the middle of a player's screen, from the game's own texts.
|
|
2674
|
+
* The game's `HudText`, `HudTextArgs` and `HudTextPro` messages.
|
|
1881
2675
|
*
|
|
1882
|
-
* Pawn: `register_message(get_user_msgid("HudTextArgs"), ...)`
|
|
2676
|
+
* Pawn: `register_message(get_user_msgid("HudText"), ...)`, `register_message(get_user_msgid("HudTextArgs"), ...)`, `register_message(get_user_msgid("HudTextPro"), ...)`
|
|
1883
2677
|
*/
|
|
1884
|
-
|
|
2678
|
+
hint: HudTextMessage;
|
|
1885
2679
|
/**
|
|
1886
|
-
* A
|
|
2680
|
+
* A player's HUD is set up, when he enters the game.
|
|
1887
2681
|
*
|
|
1888
|
-
*
|
|
1889
|
-
*/
|
|
1890
|
-
"message:HudTextPro": ClientMessage;
|
|
1891
|
-
/**
|
|
1892
|
-
* A message the server sends its clients; its arguments are `event.args`.
|
|
2682
|
+
* The game's `InitHUD` message.
|
|
1893
2683
|
*
|
|
1894
2684
|
* Pawn: `register_message(get_user_msgid("InitHUD"), ...)`
|
|
1895
2685
|
*/
|
|
1896
|
-
|
|
2686
|
+
initHud: InitHUDMessage;
|
|
1897
2687
|
/**
|
|
1898
2688
|
* A player picks up an item: the notice at the side of his screen.
|
|
1899
2689
|
*
|
|
2690
|
+
* The game's `ItemPickup` message.
|
|
2691
|
+
*
|
|
1900
2692
|
* Pawn: `register_message(get_user_msgid("ItemPickup"), ...)`
|
|
1901
2693
|
*/
|
|
1902
|
-
|
|
2694
|
+
itemPickup: ItemPickupMessage;
|
|
1903
2695
|
/**
|
|
1904
|
-
*
|
|
2696
|
+
* The night vision and the defuse kit a player has, for his HUD.
|
|
2697
|
+
*
|
|
2698
|
+
* The game's `ItemStatus` message.
|
|
1905
2699
|
*
|
|
1906
2700
|
* Pawn: `register_message(get_user_msgid("ItemStatus"), ...)`
|
|
1907
2701
|
*/
|
|
1908
|
-
|
|
2702
|
+
itemStatus: ItemStatusMessage;
|
|
1909
2703
|
/**
|
|
1910
|
-
*
|
|
2704
|
+
* The place on the map a player is in, as the radio names it.
|
|
2705
|
+
*
|
|
2706
|
+
* The game's `Location` message.
|
|
1911
2707
|
*
|
|
1912
2708
|
* Pawn: `register_message(get_user_msgid("Location"), ...)`
|
|
1913
2709
|
*/
|
|
1914
|
-
|
|
2710
|
+
location: LocationMessage;
|
|
1915
2711
|
/**
|
|
1916
2712
|
* A player's money on his HUD changes.
|
|
1917
2713
|
*
|
|
2714
|
+
* The game's `Money` message.
|
|
2715
|
+
*
|
|
1918
2716
|
* Pawn: `register_message(get_user_msgid("Money"), ...)`
|
|
1919
2717
|
*/
|
|
1920
|
-
|
|
2718
|
+
money: MoneyMessage;
|
|
1921
2719
|
/**
|
|
1922
|
-
* A message the
|
|
2720
|
+
* A part of the message of the day, the window a joining player sees.
|
|
2721
|
+
*
|
|
2722
|
+
* The game's `MOTD` message.
|
|
1923
2723
|
*
|
|
1924
2724
|
* Pawn: `register_message(get_user_msgid("MOTD"), ...)`
|
|
1925
2725
|
*/
|
|
1926
|
-
|
|
2726
|
+
motd: MOTDMessage;
|
|
1927
2727
|
/**
|
|
1928
|
-
* A
|
|
2728
|
+
* A player's night vision is turned on or off.
|
|
2729
|
+
*
|
|
2730
|
+
* The game's `NVGToggle` message.
|
|
1929
2731
|
*
|
|
1930
2732
|
* Pawn: `register_message(get_user_msgid("NVGToggle"), ...)`
|
|
1931
2733
|
*/
|
|
1932
|
-
|
|
2734
|
+
nightVision: NVGToggleMessage;
|
|
1933
2735
|
/**
|
|
1934
|
-
* A
|
|
2736
|
+
* A teammate on a player's radar.
|
|
2737
|
+
*
|
|
2738
|
+
* The game's `Radar` message.
|
|
1935
2739
|
*
|
|
1936
2740
|
* Pawn: `register_message(get_user_msgid("Radar"), ...)`
|
|
1937
2741
|
*/
|
|
1938
|
-
|
|
2742
|
+
radar: RadarMessage;
|
|
1939
2743
|
/**
|
|
1940
|
-
*
|
|
2744
|
+
* The weather on the map, rain or snow, for a player's client. Its arguments are read by place, through `event.args`.
|
|
2745
|
+
*
|
|
2746
|
+
* The game's `ReceiveW` message.
|
|
1941
2747
|
*
|
|
1942
2748
|
* Pawn: `register_message(get_user_msgid("ReceiveW"), ...)`
|
|
1943
2749
|
*/
|
|
1944
|
-
|
|
2750
|
+
weather: ClientMessage;
|
|
1945
2751
|
/**
|
|
1946
|
-
*
|
|
2752
|
+
* The sound of a weapon reloaded nearby, for a player's client. Its arguments are read by place, through `event.args`.
|
|
2753
|
+
*
|
|
2754
|
+
* The game's `ReloadSound` message.
|
|
1947
2755
|
*
|
|
1948
2756
|
* Pawn: `register_message(get_user_msgid("ReloadSound"), ...)`
|
|
1949
2757
|
*/
|
|
1950
|
-
|
|
2758
|
+
reloadSound: ClientMessage;
|
|
1951
2759
|
/**
|
|
1952
|
-
*
|
|
2760
|
+
* The game asks a player's client for its state, for the voice.
|
|
2761
|
+
*
|
|
2762
|
+
* The game's `ReqState` message.
|
|
1953
2763
|
*
|
|
1954
2764
|
* Pawn: `register_message(get_user_msgid("ReqState"), ...)`
|
|
1955
2765
|
*/
|
|
1956
|
-
|
|
2766
|
+
requestState: ReqStateMessage;
|
|
1957
2767
|
/**
|
|
1958
2768
|
* A player's HUD is reset, at his spawn.
|
|
1959
2769
|
*
|
|
2770
|
+
* The game's `ResetHUD` message.
|
|
2771
|
+
*
|
|
1960
2772
|
* Pawn: `register_message(get_user_msgid("ResetHUD"), ...)`
|
|
1961
2773
|
*/
|
|
1962
|
-
|
|
2774
|
+
resetHud: ResetHUDMessage;
|
|
1963
2775
|
/**
|
|
1964
2776
|
* The round clock at the top of a player's HUD is set.
|
|
1965
2777
|
*
|
|
2778
|
+
* The game's `RoundTime` message.
|
|
2779
|
+
*
|
|
1966
2780
|
* Pawn: `register_message(get_user_msgid("RoundTime"), ...)`
|
|
1967
2781
|
*/
|
|
1968
|
-
|
|
2782
|
+
roundTime: RoundTimeMessage;
|
|
1969
2783
|
/**
|
|
1970
2784
|
* A chat line.
|
|
1971
2785
|
*
|
|
2786
|
+
* The game's `SayText` message.
|
|
2787
|
+
*
|
|
1972
2788
|
* Pawn: `register_message(get_user_msgid("SayText"), ...)`
|
|
1973
2789
|
*/
|
|
1974
|
-
|
|
2790
|
+
chat: SayTextMessage;
|
|
1975
2791
|
/**
|
|
1976
|
-
*
|
|
2792
|
+
* The scenario icon on a player's HUD, such as the bomb's or a hostage's.
|
|
2793
|
+
*
|
|
2794
|
+
* The game's `Scenario` message.
|
|
1977
2795
|
*
|
|
1978
2796
|
* Pawn: `register_message(get_user_msgid("Scenario"), ...)`
|
|
1979
2797
|
*/
|
|
1980
|
-
|
|
2798
|
+
scenarioIcon: ScenarioMessage;
|
|
1981
2799
|
/**
|
|
1982
|
-
*
|
|
2800
|
+
* The marks the scoreboard shows beside a player: dead, the bomb, the VIP.
|
|
2801
|
+
*
|
|
2802
|
+
* The game's `ScoreAttrib` message.
|
|
1983
2803
|
*
|
|
1984
2804
|
* Pawn: `register_message(get_user_msgid("ScoreAttrib"), ...)`
|
|
1985
2805
|
*/
|
|
1986
|
-
|
|
2806
|
+
scoreAttribute: ScoreAttribMessage;
|
|
1987
2807
|
/**
|
|
1988
2808
|
* A player's row on the scoreboard.
|
|
1989
2809
|
*
|
|
2810
|
+
* The game's `ScoreInfo` message.
|
|
2811
|
+
*
|
|
1990
2812
|
* Pawn: `register_message(get_user_msgid("ScoreInfo"), ...)`
|
|
1991
2813
|
*/
|
|
1992
|
-
|
|
2814
|
+
score: ScoreInfoMessage;
|
|
1993
2815
|
/**
|
|
1994
|
-
* A
|
|
2816
|
+
* A player's screen is coloured, fading in or out - a flashbang, a fade to black.
|
|
2817
|
+
*
|
|
2818
|
+
* The game's `ScreenFade` message.
|
|
1995
2819
|
*
|
|
1996
2820
|
* Pawn: `register_message(get_user_msgid("ScreenFade"), ...)`
|
|
1997
2821
|
*/
|
|
1998
|
-
|
|
2822
|
+
screenFade: ScreenFadeMessage;
|
|
1999
2823
|
/**
|
|
2000
|
-
* A
|
|
2824
|
+
* A player's view shakes - an explosion nearby.
|
|
2825
|
+
*
|
|
2826
|
+
* The game's `ScreenShake` message.
|
|
2001
2827
|
*
|
|
2002
2828
|
* Pawn: `register_message(get_user_msgid("ScreenShake"), ...)`
|
|
2003
2829
|
*/
|
|
2004
|
-
|
|
2830
|
+
screenShake: ScreenShakeMessage;
|
|
2005
2831
|
/**
|
|
2006
2832
|
* A sound played to a player, such as a radio line.
|
|
2007
2833
|
*
|
|
2834
|
+
* The game's `SendAudio` message.
|
|
2835
|
+
*
|
|
2008
2836
|
* Pawn: `register_message(get_user_msgid("SendAudio"), ...)`
|
|
2009
2837
|
*/
|
|
2010
|
-
|
|
2838
|
+
sound: SendAudioMessage;
|
|
2011
2839
|
/**
|
|
2012
|
-
*
|
|
2840
|
+
* The server's name a player's client shows.
|
|
2841
|
+
*
|
|
2842
|
+
* The game's `ServerName` message.
|
|
2013
2843
|
*
|
|
2014
2844
|
* Pawn: `register_message(get_user_msgid("ServerName"), ...)`
|
|
2015
2845
|
*/
|
|
2016
|
-
|
|
2846
|
+
serverName: ServerNameMessage;
|
|
2017
2847
|
/**
|
|
2018
2848
|
* A player's field of view is set.
|
|
2019
2849
|
*
|
|
2850
|
+
* The game's `SetFOV` message.
|
|
2851
|
+
*
|
|
2020
2852
|
* Pawn: `register_message(get_user_msgid("SetFOV"), ...)`
|
|
2021
2853
|
*/
|
|
2022
|
-
|
|
2854
|
+
fov: SetFOVMessage;
|
|
2023
2855
|
/**
|
|
2024
|
-
*
|
|
2856
|
+
* The sprite a player's client draws the players' shadows with. Its arguments are read by place, through `event.args`.
|
|
2857
|
+
*
|
|
2858
|
+
* The game's `ShadowIdx` message.
|
|
2025
2859
|
*
|
|
2026
2860
|
* Pawn: `register_message(get_user_msgid("ShadowIdx"), ...)`
|
|
2027
2861
|
*/
|
|
2028
|
-
|
|
2862
|
+
shadow: ClientMessage;
|
|
2029
2863
|
/**
|
|
2030
|
-
* A
|
|
2864
|
+
* A text menu on a player's screen - the team menu without VGUI, the radio, a plugin's menu.
|
|
2865
|
+
*
|
|
2866
|
+
* The game's `ShowMenu` message.
|
|
2031
2867
|
*
|
|
2032
2868
|
* Pawn: `register_message(get_user_msgid("ShowMenu"), ...)`
|
|
2033
2869
|
*/
|
|
2034
|
-
|
|
2870
|
+
menu: ShowMenuMessage;
|
|
2035
2871
|
/**
|
|
2036
|
-
*
|
|
2872
|
+
* The round clock appears on a player's HUD.
|
|
2873
|
+
*
|
|
2874
|
+
* The game's `ShowTimer` message.
|
|
2037
2875
|
*
|
|
2038
2876
|
* Pawn: `register_message(get_user_msgid("ShowTimer"), ...)`
|
|
2039
2877
|
*/
|
|
2040
|
-
|
|
2878
|
+
showTimer: ShowTimerMessage;
|
|
2041
2879
|
/**
|
|
2042
|
-
*
|
|
2880
|
+
* The health of the player a spectator watches.
|
|
2043
2881
|
*
|
|
2044
|
-
*
|
|
2045
|
-
*/
|
|
2046
|
-
"message:SpecHealth": ClientMessage;
|
|
2047
|
-
/**
|
|
2048
|
-
* A message the server sends its clients; its arguments are `event.args`.
|
|
2882
|
+
* The game's `SpecHealth` and `SpecHealth2` messages.
|
|
2049
2883
|
*
|
|
2050
|
-
* Pawn: `register_message(get_user_msgid("SpecHealth2"), ...)`
|
|
2884
|
+
* Pawn: `register_message(get_user_msgid("SpecHealth"), ...)`, `register_message(get_user_msgid("SpecHealth2"), ...)`
|
|
2051
2885
|
*/
|
|
2052
|
-
|
|
2886
|
+
spectatedHealth: SpecHealthMessage;
|
|
2053
2887
|
/**
|
|
2054
|
-
* A
|
|
2888
|
+
* A player becomes a spectator, or stops being one, on the scoreboard.
|
|
2889
|
+
*
|
|
2890
|
+
* The game's `Spectator` message.
|
|
2055
2891
|
*
|
|
2056
2892
|
* Pawn: `register_message(get_user_msgid("Spectator"), ...)`
|
|
2057
2893
|
*/
|
|
2058
|
-
|
|
2894
|
+
spectator: SpectatorMessage;
|
|
2059
2895
|
/**
|
|
2060
2896
|
* A status icon on a player's HUD - the buy zone, the bomb - is shown, flashed or hidden.
|
|
2061
2897
|
*
|
|
2898
|
+
* The game's `StatusIcon` message.
|
|
2899
|
+
*
|
|
2062
2900
|
* Pawn: `register_message(get_user_msgid("StatusIcon"), ...)`
|
|
2063
2901
|
*/
|
|
2064
|
-
|
|
2902
|
+
statusIcon: StatusIconMessage;
|
|
2065
2903
|
/**
|
|
2066
|
-
*
|
|
2904
|
+
* The status line at the bottom of a player's screen, such as the name of the player he aims at.
|
|
2905
|
+
*
|
|
2906
|
+
* The game's `StatusText` message.
|
|
2067
2907
|
*
|
|
2068
2908
|
* Pawn: `register_message(get_user_msgid("StatusText"), ...)`
|
|
2069
2909
|
*/
|
|
2070
|
-
|
|
2910
|
+
statusText: StatusTextMessage;
|
|
2071
2911
|
/**
|
|
2072
|
-
* A
|
|
2912
|
+
* A value the status line shows, such as the player a player aims at.
|
|
2913
|
+
*
|
|
2914
|
+
* The game's `StatusValue` message.
|
|
2073
2915
|
*
|
|
2074
2916
|
* Pawn: `register_message(get_user_msgid("StatusValue"), ...)`
|
|
2075
2917
|
*/
|
|
2076
|
-
|
|
2918
|
+
statusValue: StatusValueMessage;
|
|
2077
2919
|
/**
|
|
2078
|
-
*
|
|
2920
|
+
* The countdown of a task on a player's HUD, such as rescuing the hostages in a career.
|
|
2921
|
+
*
|
|
2922
|
+
* The game's `TaskTime` message.
|
|
2079
2923
|
*
|
|
2080
2924
|
* Pawn: `register_message(get_user_msgid("TaskTime"), ...)`
|
|
2081
2925
|
*/
|
|
2082
|
-
|
|
2926
|
+
taskTime: TaskTimeMessage;
|
|
2083
2927
|
/**
|
|
2084
2928
|
* A player's team on the scoreboard.
|
|
2085
2929
|
*
|
|
2930
|
+
* The game's `TeamInfo` message.
|
|
2931
|
+
*
|
|
2086
2932
|
* Pawn: `register_message(get_user_msgid("TeamInfo"), ...)`
|
|
2087
2933
|
*/
|
|
2088
|
-
|
|
2934
|
+
team: TeamInfoMessage;
|
|
2089
2935
|
/**
|
|
2090
|
-
* A
|
|
2936
|
+
* A team's score on the scoreboard.
|
|
2937
|
+
*
|
|
2938
|
+
* The game's `TeamScore` message.
|
|
2091
2939
|
*
|
|
2092
2940
|
* Pawn: `register_message(get_user_msgid("TeamScore"), ...)`
|
|
2093
2941
|
*/
|
|
2094
|
-
|
|
2942
|
+
teamScore: TeamScoreMessage;
|
|
2095
2943
|
/**
|
|
2096
2944
|
* A text from the game - an announcement, a hint - in chat, the console or the middle of the screen.
|
|
2097
2945
|
*
|
|
2946
|
+
* The game's `TextMsg` message.
|
|
2947
|
+
*
|
|
2098
2948
|
* Pawn: `register_message(get_user_msgid("TextMsg"), ...)`
|
|
2099
2949
|
*/
|
|
2100
|
-
|
|
2950
|
+
text: TextMsgMessage;
|
|
2101
2951
|
/**
|
|
2102
|
-
*
|
|
2952
|
+
* The speed of the train a player drives, on his HUD.
|
|
2953
|
+
*
|
|
2954
|
+
* The game's `Train` message.
|
|
2103
2955
|
*
|
|
2104
2956
|
* Pawn: `register_message(get_user_msgid("Train"), ...)`
|
|
2105
2957
|
*/
|
|
2106
|
-
|
|
2958
|
+
train: TrainMessage;
|
|
2107
2959
|
/**
|
|
2108
|
-
* A message
|
|
2960
|
+
* A tutor's message on a player's screen closes.
|
|
2961
|
+
*
|
|
2962
|
+
* The game's `TutorClose` message.
|
|
2109
2963
|
*
|
|
2110
2964
|
* Pawn: `register_message(get_user_msgid("TutorClose"), ...)`
|
|
2111
2965
|
*/
|
|
2112
|
-
|
|
2966
|
+
tutorClose: TutorCloseMessage;
|
|
2113
2967
|
/**
|
|
2114
|
-
* A
|
|
2968
|
+
* A tutor's pointer on a player's screen, at a thing in the world. Its arguments are read by place, through `event.args`.
|
|
2969
|
+
*
|
|
2970
|
+
* The game's `TutorLine` message.
|
|
2115
2971
|
*
|
|
2116
2972
|
* Pawn: `register_message(get_user_msgid("TutorLine"), ...)`
|
|
2117
2973
|
*/
|
|
2118
|
-
|
|
2974
|
+
tutorLine: ClientMessage;
|
|
2119
2975
|
/**
|
|
2120
|
-
*
|
|
2976
|
+
* The tutor's state on a player's client. Its arguments are read by place, through `event.args`.
|
|
2977
|
+
*
|
|
2978
|
+
* The game's `TutorState` message.
|
|
2121
2979
|
*
|
|
2122
2980
|
* Pawn: `register_message(get_user_msgid("TutorState"), ...)`
|
|
2123
2981
|
*/
|
|
2124
|
-
|
|
2982
|
+
tutorState: ClientMessage;
|
|
2125
2983
|
/**
|
|
2126
|
-
* A message
|
|
2984
|
+
* A tutor's message on a player's screen. Its arguments are read by place, through `event.args`.
|
|
2985
|
+
*
|
|
2986
|
+
* The game's `TutorText` message.
|
|
2127
2987
|
*
|
|
2128
2988
|
* Pawn: `register_message(get_user_msgid("TutorText"), ...)`
|
|
2129
2989
|
*/
|
|
2130
|
-
|
|
2990
|
+
tutorText: ClientMessage;
|
|
2131
2991
|
/**
|
|
2132
|
-
* A
|
|
2992
|
+
* A VGUI menu of the game opens on a player's screen: the team menu, the class menu, the buy menu.
|
|
2993
|
+
*
|
|
2994
|
+
* The game's `VGUIMenu` message.
|
|
2133
2995
|
*
|
|
2134
2996
|
* Pawn: `register_message(get_user_msgid("VGUIMenu"), ...)`
|
|
2135
2997
|
*/
|
|
2136
|
-
|
|
2998
|
+
vguiMenu: VGUIMenuMessage;
|
|
2137
2999
|
/**
|
|
2138
|
-
* A
|
|
3000
|
+
* A player's view goes back to first person.
|
|
3001
|
+
*
|
|
3002
|
+
* The game's `ViewMode` message.
|
|
2139
3003
|
*
|
|
2140
3004
|
* Pawn: `register_message(get_user_msgid("ViewMode"), ...)`
|
|
2141
3005
|
*/
|
|
2142
|
-
|
|
3006
|
+
viewMode: ViewModeMessage;
|
|
2143
3007
|
/**
|
|
2144
|
-
*
|
|
3008
|
+
* The players a player hears on the voice chat, and the ones he has muted. Its arguments are read by place, through `event.args`.
|
|
3009
|
+
*
|
|
3010
|
+
* The game's `VoiceMask` message.
|
|
2145
3011
|
*
|
|
2146
3012
|
* Pawn: `register_message(get_user_msgid("VoiceMask"), ...)`
|
|
2147
3013
|
*/
|
|
2148
|
-
|
|
3014
|
+
voiceMask: ClientMessage;
|
|
2149
3015
|
/**
|
|
2150
|
-
* A
|
|
3016
|
+
* A weapon's description for a player's client: its ammo, its slot, its place in the slot.
|
|
3017
|
+
*
|
|
3018
|
+
* The game's `WeaponList` message.
|
|
2151
3019
|
*
|
|
2152
3020
|
* Pawn: `register_message(get_user_msgid("WeaponList"), ...)`
|
|
2153
3021
|
*/
|
|
2154
|
-
|
|
3022
|
+
weaponList: WeaponListMessage;
|
|
2155
3023
|
/**
|
|
2156
3024
|
* A player picks up a weapon: the notice at the side of his screen.
|
|
2157
3025
|
*
|
|
3026
|
+
* The game's `WeapPickup` message.
|
|
3027
|
+
*
|
|
2158
3028
|
* Pawn: `register_message(get_user_msgid("WeapPickup"), ...)`
|
|
2159
3029
|
*/
|
|
2160
|
-
|
|
3030
|
+
weaponPickup: WeapPickupMessage;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
/** The game's names of the messages a name server.addMessageListener takes hears; a name it does not know as it is. */
|
|
3034
|
+
export function protocolMessageNames(name: string): string[] {
|
|
3035
|
+
if (name == "adStop") return ["ADStop"];
|
|
3036
|
+
if (name == "allowSpectate") return ["AllowSpec"];
|
|
3037
|
+
if (name == "ammoPickup") return ["AmmoPickup"];
|
|
3038
|
+
if (name == "ammo") return ["AmmoX"];
|
|
3039
|
+
if (name == "armorType") return ["ArmorType"];
|
|
3040
|
+
if (name == "progressBar") return ["BarTime", "BarTime2"];
|
|
3041
|
+
if (name == "armor") return ["Battery"];
|
|
3042
|
+
if (name == "moneyBlink") return ["BlinkAcct"];
|
|
3043
|
+
if (name == "bombDrop") return ["BombDrop"];
|
|
3044
|
+
if (name == "bombPickup") return ["BombPickup"];
|
|
3045
|
+
if (name == "botProgress") return ["BotProgress"];
|
|
3046
|
+
if (name == "botVoice") return ["BotVoice"];
|
|
3047
|
+
if (name == "shellCasing") return ["Brass"];
|
|
3048
|
+
if (name == "closeBuyMenu") return ["BuyClose"];
|
|
3049
|
+
if (name == "corpse") return ["ClCorpse"];
|
|
3050
|
+
if (name == "crosshair") return ["Crosshair"];
|
|
3051
|
+
if (name == "currentWeapon") return ["CurWeapon"];
|
|
3052
|
+
if (name == "czCareer") return ["CZCareer"];
|
|
3053
|
+
if (name == "czCareerHud") return ["CZCareerHUD"];
|
|
3054
|
+
if (name == "damage") return ["Damage"];
|
|
3055
|
+
if (name == "death") return ["DeathMsg"];
|
|
3056
|
+
if (name == "flashlight") return ["Flashlight"];
|
|
3057
|
+
if (name == "flashlightBattery") return ["FlashBat"];
|
|
3058
|
+
if (name == "fog") return ["Fog"];
|
|
3059
|
+
if (name == "forceCamera") return ["ForceCam"];
|
|
3060
|
+
if (name == "gameMode") return ["GameMode"];
|
|
3061
|
+
if (name == "gameTitle") return ["GameTitle"];
|
|
3062
|
+
if (name == "geiger") return ["Geiger"];
|
|
3063
|
+
if (name == "health") return ["Health"];
|
|
3064
|
+
if (name == "hideWeapon") return ["HideWeapon"];
|
|
3065
|
+
if (name == "hltv") return ["HLTV"];
|
|
3066
|
+
if (name == "hostageKilled") return ["HostageK"];
|
|
3067
|
+
if (name == "hostagePosition") return ["HostagePos"];
|
|
3068
|
+
if (name == "hint") return ["HudText", "HudTextArgs", "HudTextPro"];
|
|
3069
|
+
if (name == "initHud") return ["InitHUD"];
|
|
3070
|
+
if (name == "itemPickup") return ["ItemPickup"];
|
|
3071
|
+
if (name == "itemStatus") return ["ItemStatus"];
|
|
3072
|
+
if (name == "location") return ["Location"];
|
|
3073
|
+
if (name == "money") return ["Money"];
|
|
3074
|
+
if (name == "motd") return ["MOTD"];
|
|
3075
|
+
if (name == "nightVision") return ["NVGToggle"];
|
|
3076
|
+
if (name == "radar") return ["Radar"];
|
|
3077
|
+
if (name == "weather") return ["ReceiveW"];
|
|
3078
|
+
if (name == "reloadSound") return ["ReloadSound"];
|
|
3079
|
+
if (name == "requestState") return ["ReqState"];
|
|
3080
|
+
if (name == "resetHud") return ["ResetHUD"];
|
|
3081
|
+
if (name == "roundTime") return ["RoundTime"];
|
|
3082
|
+
if (name == "chat") return ["SayText"];
|
|
3083
|
+
if (name == "scenarioIcon") return ["Scenario"];
|
|
3084
|
+
if (name == "scoreAttribute") return ["ScoreAttrib"];
|
|
3085
|
+
if (name == "score") return ["ScoreInfo"];
|
|
3086
|
+
if (name == "screenFade") return ["ScreenFade"];
|
|
3087
|
+
if (name == "screenShake") return ["ScreenShake"];
|
|
3088
|
+
if (name == "sound") return ["SendAudio"];
|
|
3089
|
+
if (name == "serverName") return ["ServerName"];
|
|
3090
|
+
if (name == "fov") return ["SetFOV"];
|
|
3091
|
+
if (name == "shadow") return ["ShadowIdx"];
|
|
3092
|
+
if (name == "menu") return ["ShowMenu"];
|
|
3093
|
+
if (name == "showTimer") return ["ShowTimer"];
|
|
3094
|
+
if (name == "spectatedHealth") return ["SpecHealth", "SpecHealth2"];
|
|
3095
|
+
if (name == "spectator") return ["Spectator"];
|
|
3096
|
+
if (name == "statusIcon") return ["StatusIcon"];
|
|
3097
|
+
if (name == "statusText") return ["StatusText"];
|
|
3098
|
+
if (name == "statusValue") return ["StatusValue"];
|
|
3099
|
+
if (name == "taskTime") return ["TaskTime"];
|
|
3100
|
+
if (name == "team") return ["TeamInfo"];
|
|
3101
|
+
if (name == "teamScore") return ["TeamScore"];
|
|
3102
|
+
if (name == "text") return ["TextMsg"];
|
|
3103
|
+
if (name == "train") return ["Train"];
|
|
3104
|
+
if (name == "tutorClose") return ["TutorClose"];
|
|
3105
|
+
if (name == "tutorLine") return ["TutorLine"];
|
|
3106
|
+
if (name == "tutorState") return ["TutorState"];
|
|
3107
|
+
if (name == "tutorText") return ["TutorText"];
|
|
3108
|
+
if (name == "vguiMenu") return ["VGUIMenu"];
|
|
3109
|
+
if (name == "viewMode") return ["ViewMode"];
|
|
3110
|
+
if (name == "voiceMask") return ["VoiceMask"];
|
|
3111
|
+
if (name == "weaponList") return ["WeaponList"];
|
|
3112
|
+
if (name == "weaponPickup") return ["WeapPickup"];
|
|
3113
|
+
return [name];
|
|
2161
3114
|
}
|
|
2162
3115
|
|
|
2163
3116
|
const initListeners: ((event: PluginInitEvent) => void)[] = [];
|
|
2164
|
-
let initRelayed = false;
|
|
2165
3117
|
|
|
2166
3118
|
function initTrampoline(a0: i32): void {
|
|
2167
3119
|
if (initListeners.length == 0) return;
|
|
@@ -2172,7 +3124,6 @@ function initTrampoline(a0: i32): void {
|
|
|
2172
3124
|
}
|
|
2173
3125
|
|
|
2174
3126
|
const pauseListeners: ((event: PluginPauseEvent) => void)[] = [];
|
|
2175
|
-
let pauseRelayed = false;
|
|
2176
3127
|
|
|
2177
3128
|
function pauseTrampoline(a0: i32): void {
|
|
2178
3129
|
if (pauseListeners.length == 0) return;
|
|
@@ -2183,7 +3134,6 @@ function pauseTrampoline(a0: i32): void {
|
|
|
2183
3134
|
}
|
|
2184
3135
|
|
|
2185
3136
|
const unpauseListeners: ((event: PluginUnpauseEvent) => void)[] = [];
|
|
2186
|
-
let unpauseRelayed = false;
|
|
2187
3137
|
|
|
2188
3138
|
function unpauseTrampoline(a0: i32): void {
|
|
2189
3139
|
if (unpauseListeners.length == 0) return;
|
|
@@ -2193,30 +3143,27 @@ function unpauseTrampoline(a0: i32): void {
|
|
|
2193
3143
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2194
3144
|
}
|
|
2195
3145
|
|
|
2196
|
-
const
|
|
2197
|
-
let changelevelRelayed = false;
|
|
3146
|
+
const changeLevelListeners: ((event: ServerChangelevelEvent) => void)[] = [];
|
|
2198
3147
|
|
|
2199
|
-
function
|
|
2200
|
-
if (
|
|
3148
|
+
function changeLevelTrampoline(a0: i32): void {
|
|
3149
|
+
if (changeLevelListeners.length == 0) return;
|
|
2201
3150
|
const event = new ServerChangelevelEvent(__nativeString(0));
|
|
2202
3151
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2203
|
-
const listeners =
|
|
3152
|
+
const listeners = changeLevelListeners.slice(0);
|
|
2204
3153
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2205
3154
|
}
|
|
2206
3155
|
|
|
2207
|
-
const
|
|
2208
|
-
let cfgRelayed = false;
|
|
3156
|
+
const pluginsLoadedListeners: ((event: PluginCfgEvent) => void)[] = [];
|
|
2209
3157
|
|
|
2210
|
-
function
|
|
2211
|
-
if (
|
|
3158
|
+
function pluginsLoadedTrampoline(a0: i32): void {
|
|
3159
|
+
if (pluginsLoadedListeners.length == 0) return;
|
|
2212
3160
|
const event = new PluginCfgEvent();
|
|
2213
3161
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2214
|
-
const listeners =
|
|
3162
|
+
const listeners = pluginsLoadedListeners.slice(0);
|
|
2215
3163
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2216
3164
|
}
|
|
2217
3165
|
|
|
2218
3166
|
const endListeners: ((event: PluginEndEvent) => void)[] = [];
|
|
2219
|
-
let endRelayed = false;
|
|
2220
3167
|
|
|
2221
3168
|
function endTrampoline(a0: i32): void {
|
|
2222
3169
|
if (endListeners.length == 0) return;
|
|
@@ -2227,7 +3174,6 @@ function endTrampoline(a0: i32): void {
|
|
|
2227
3174
|
}
|
|
2228
3175
|
|
|
2229
3176
|
const logListeners: ((event: PluginLogEvent) => void)[] = [];
|
|
2230
|
-
let logRelayed = false;
|
|
2231
3177
|
|
|
2232
3178
|
function logTrampoline(a0: i32): void {
|
|
2233
3179
|
if (logListeners.length == 0) return;
|
|
@@ -2238,7 +3184,6 @@ function logTrampoline(a0: i32): void {
|
|
|
2238
3184
|
}
|
|
2239
3185
|
|
|
2240
3186
|
const precacheListeners: ((event: PluginPrecacheEvent) => void)[] = [];
|
|
2241
|
-
let precacheRelayed = false;
|
|
2242
3187
|
|
|
2243
3188
|
function precacheTrampoline(a0: i32): void {
|
|
2244
3189
|
if (precacheListeners.length == 0) return;
|
|
@@ -2248,14 +3193,13 @@ function precacheTrampoline(a0: i32): void {
|
|
|
2248
3193
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2249
3194
|
}
|
|
2250
3195
|
|
|
2251
|
-
const
|
|
2252
|
-
let infochangedRelayed = false;
|
|
3196
|
+
const clientInfochangedListeners: ((event: ClientInfochangedEvent) => void)[] = [];
|
|
2253
3197
|
|
|
2254
|
-
function
|
|
2255
|
-
if (
|
|
3198
|
+
function clientInfochangedTrampoline(a0: i32): void {
|
|
3199
|
+
if (clientInfochangedListeners.length == 0) return;
|
|
2256
3200
|
const event = new ClientInfochangedEvent(new Player(__nativeCell(0)));
|
|
2257
3201
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2258
|
-
const listeners =
|
|
3202
|
+
const listeners = clientInfochangedListeners.slice(0);
|
|
2259
3203
|
const ambient = __co_ambient_player;
|
|
2260
3204
|
__co_ambient_player = a0;
|
|
2261
3205
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
@@ -2263,7 +3207,6 @@ function infochangedTrampoline(a0: i32): void {
|
|
|
2263
3207
|
}
|
|
2264
3208
|
|
|
2265
3209
|
const connectListeners: ((event: ClientConnectEvent) => void)[] = [];
|
|
2266
|
-
let connectRelayed = false;
|
|
2267
3210
|
|
|
2268
3211
|
function connectTrampoline(a0: i32): void {
|
|
2269
3212
|
if (connectListeners.length == 0) return;
|
|
@@ -2276,14 +3219,13 @@ function connectTrampoline(a0: i32): void {
|
|
|
2276
3219
|
__co_ambient_player = ambient;
|
|
2277
3220
|
}
|
|
2278
3221
|
|
|
2279
|
-
const
|
|
2280
|
-
let connectexRelayed = false;
|
|
3222
|
+
const connectAttemptListeners: ((event: ClientConnectexEvent) => void)[] = [];
|
|
2281
3223
|
|
|
2282
|
-
function
|
|
2283
|
-
if (
|
|
3224
|
+
function connectAttemptTrampoline(a0: i32): void {
|
|
3225
|
+
if (connectAttemptListeners.length == 0) return;
|
|
2284
3226
|
const event = new ClientConnectexEvent(new Player(__nativeCell(0)), __nativeString(1), __nativeString(2), __nativeString(3));
|
|
2285
3227
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2286
|
-
const listeners =
|
|
3228
|
+
const listeners = connectAttemptListeners.slice(0);
|
|
2287
3229
|
const ambient = __co_ambient_player;
|
|
2288
3230
|
__co_ambient_player = a0;
|
|
2289
3231
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
@@ -2291,7 +3233,6 @@ function connectexTrampoline(a0: i32): void {
|
|
|
2291
3233
|
}
|
|
2292
3234
|
|
|
2293
3235
|
const authorizedListeners: ((event: ClientAuthorizedEvent) => void)[] = [];
|
|
2294
|
-
let authorizedRelayed = false;
|
|
2295
3236
|
|
|
2296
3237
|
function authorizedTrampoline(a0: i32): void {
|
|
2297
3238
|
if (authorizedListeners.length == 0) return;
|
|
@@ -2304,19 +3245,7 @@ function authorizedTrampoline(a0: i32): void {
|
|
|
2304
3245
|
__co_ambient_player = ambient;
|
|
2305
3246
|
}
|
|
2306
3247
|
|
|
2307
|
-
const disconnectListeners: ((event: ClientDisconnectEvent) => void)[] = [];
|
|
2308
|
-
let disconnectRelayed = false;
|
|
2309
|
-
|
|
2310
|
-
function disconnectTrampoline(a0: i32): void {
|
|
2311
|
-
if (disconnectListeners.length == 0) return;
|
|
2312
|
-
const event = new ClientDisconnectEvent(new Player(__nativeCell(0)));
|
|
2313
|
-
// A copy: a listener that removes itself must not make the next one skip.
|
|
2314
|
-
const listeners = disconnectListeners.slice(0);
|
|
2315
|
-
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
3248
|
const disconnectedListeners: ((event: ClientDisconnectedEvent) => void)[] = [];
|
|
2319
|
-
let disconnectedRelayed = false;
|
|
2320
3249
|
|
|
2321
3250
|
function disconnectedTrampoline(a0: i32): void {
|
|
2322
3251
|
if (disconnectedListeners.length == 0) return;
|
|
@@ -2327,7 +3256,6 @@ function disconnectedTrampoline(a0: i32): void {
|
|
|
2327
3256
|
}
|
|
2328
3257
|
|
|
2329
3258
|
const removeListeners: ((event: ClientRemoveEvent) => void)[] = [];
|
|
2330
|
-
let removeRelayed = false;
|
|
2331
3259
|
|
|
2332
3260
|
function removeTrampoline(a0: i32): void {
|
|
2333
3261
|
if (removeListeners.length == 0) return;
|
|
@@ -2338,7 +3266,6 @@ function removeTrampoline(a0: i32): void {
|
|
|
2338
3266
|
}
|
|
2339
3267
|
|
|
2340
3268
|
const commandListeners: ((event: ClientCommandEvent) => void)[] = [];
|
|
2341
|
-
let commandRelayed = false;
|
|
2342
3269
|
|
|
2343
3270
|
function commandTrampoline(a0: i32): void {
|
|
2344
3271
|
if (commandListeners.length == 0) return;
|
|
@@ -2351,14 +3278,13 @@ function commandTrampoline(a0: i32): void {
|
|
|
2351
3278
|
__co_ambient_player = ambient;
|
|
2352
3279
|
}
|
|
2353
3280
|
|
|
2354
|
-
const
|
|
2355
|
-
let putinserverRelayed = false;
|
|
3281
|
+
const putInServerListeners: ((event: ClientPutinserverEvent) => void)[] = [];
|
|
2356
3282
|
|
|
2357
|
-
function
|
|
2358
|
-
if (
|
|
3283
|
+
function putInServerTrampoline(a0: i32): void {
|
|
3284
|
+
if (putInServerListeners.length == 0) return;
|
|
2359
3285
|
const event = new ClientPutinserverEvent(new Player(__nativeCell(0)));
|
|
2360
3286
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2361
|
-
const listeners =
|
|
3287
|
+
const listeners = putInServerListeners.slice(0);
|
|
2362
3288
|
const ambient = __co_ambient_player;
|
|
2363
3289
|
__co_ambient_player = a0;
|
|
2364
3290
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
@@ -2366,7 +3292,6 @@ function putinserverTrampoline(a0: i32): void {
|
|
|
2366
3292
|
}
|
|
2367
3293
|
|
|
2368
3294
|
const inconsistentFileListeners: ((event: InconsistentFileEvent) => void)[] = [];
|
|
2369
|
-
let inconsistentFileRelayed = false;
|
|
2370
3295
|
|
|
2371
3296
|
function inconsistentFileTrampoline(a0: i32): void {
|
|
2372
3297
|
if (inconsistentFileListeners.length == 0) return;
|
|
@@ -2380,7 +3305,6 @@ function inconsistentFileTrampoline(a0: i32): void {
|
|
|
2380
3305
|
}
|
|
2381
3306
|
|
|
2382
3307
|
const modulesListeners: ((event: PluginModulesEvent) => void)[] = [];
|
|
2383
|
-
let modulesRelayed = false;
|
|
2384
3308
|
|
|
2385
3309
|
function modulesTrampoline(a0: i32): void {
|
|
2386
3310
|
if (modulesListeners.length == 0) return;
|
|
@@ -2390,36 +3314,33 @@ function modulesTrampoline(a0: i32): void {
|
|
|
2390
3314
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2391
3315
|
}
|
|
2392
3316
|
|
|
2393
|
-
const
|
|
2394
|
-
let OnConfigsExecutedRelayed = false;
|
|
3317
|
+
const configsExecutedListeners: ((event: OnConfigsExecutedEvent) => void)[] = [];
|
|
2395
3318
|
|
|
2396
|
-
function
|
|
2397
|
-
if (
|
|
3319
|
+
function configsExecutedTrampoline(a0: i32): void {
|
|
3320
|
+
if (configsExecutedListeners.length == 0) return;
|
|
2398
3321
|
const event = new OnConfigsExecutedEvent();
|
|
2399
3322
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2400
|
-
const listeners =
|
|
3323
|
+
const listeners = configsExecutedListeners.slice(0);
|
|
2401
3324
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2402
3325
|
}
|
|
2403
3326
|
|
|
2404
|
-
const
|
|
2405
|
-
let OnAutoConfigsBufferedRelayed = false;
|
|
3327
|
+
const configsQueuedListeners: ((event: OnAutoConfigsBufferedEvent) => void)[] = [];
|
|
2406
3328
|
|
|
2407
|
-
function
|
|
2408
|
-
if (
|
|
3329
|
+
function configsQueuedTrampoline(a0: i32): void {
|
|
3330
|
+
if (configsQueuedListeners.length == 0) return;
|
|
2409
3331
|
const event = new OnAutoConfigsBufferedEvent();
|
|
2410
3332
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2411
|
-
const listeners =
|
|
3333
|
+
const listeners = configsQueuedListeners.slice(0);
|
|
2412
3334
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2413
3335
|
}
|
|
2414
3336
|
|
|
2415
|
-
const
|
|
2416
|
-
let CS_InternalCommandRelayed = false;
|
|
3337
|
+
const internalCommandListeners: ((event: CS_InternalCommandEvent) => void)[] = [];
|
|
2417
3338
|
|
|
2418
|
-
function
|
|
2419
|
-
if (
|
|
3339
|
+
function internalCommandTrampoline(a0: i32): void {
|
|
3340
|
+
if (internalCommandListeners.length == 0) return;
|
|
2420
3341
|
const event = new CS_InternalCommandEvent(new Player(__nativeCell(0)), __nativeString(1));
|
|
2421
3342
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2422
|
-
const listeners =
|
|
3343
|
+
const listeners = internalCommandListeners.slice(0);
|
|
2423
3344
|
const ambient = __co_ambient_player;
|
|
2424
3345
|
__co_ambient_player = a0;
|
|
2425
3346
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
@@ -2427,7 +3348,6 @@ function CS_InternalCommandTrampoline(a0: i32): void {
|
|
|
2427
3348
|
}
|
|
2428
3349
|
|
|
2429
3350
|
const CS_OnBuyAttemptListeners: ((event: CS_OnBuyAttemptEvent) => void)[] = [];
|
|
2430
|
-
let CS_OnBuyAttemptRelayed = false;
|
|
2431
3351
|
|
|
2432
3352
|
function CS_OnBuyAttemptTrampoline(a0: i32): void {
|
|
2433
3353
|
if (CS_OnBuyAttemptListeners.length == 0) return;
|
|
@@ -2441,7 +3361,6 @@ function CS_OnBuyAttemptTrampoline(a0: i32): void {
|
|
|
2441
3361
|
}
|
|
2442
3362
|
|
|
2443
3363
|
const CS_OnBuyListeners: ((event: CS_OnBuyEvent) => void)[] = [];
|
|
2444
|
-
let CS_OnBuyRelayed = false;
|
|
2445
3364
|
|
|
2446
3365
|
function CS_OnBuyTrampoline(a0: i32): void {
|
|
2447
3366
|
if (CS_OnBuyListeners.length == 0) return;
|
|
@@ -2454,19 +3373,7 @@ function CS_OnBuyTrampoline(a0: i32): void {
|
|
|
2454
3373
|
__co_ambient_player = ambient;
|
|
2455
3374
|
}
|
|
2456
3375
|
|
|
2457
|
-
const pfnTouchListeners: ((event: PfnTouchEvent) => void)[] = [];
|
|
2458
|
-
let pfnTouchRelayed = false;
|
|
2459
|
-
|
|
2460
|
-
function pfnTouchTrampoline(a0: i32): void {
|
|
2461
|
-
if (pfnTouchListeners.length == 0) return;
|
|
2462
|
-
const event = new PfnTouchEvent(<f64>__nativeCell(0), <f64>__nativeCell(1));
|
|
2463
|
-
// A copy: a listener that removes itself must not make the next one skip.
|
|
2464
|
-
const listeners = pfnTouchListeners.slice(0);
|
|
2465
|
-
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
3376
|
const frameListeners: ((event: ServerFrameEvent) => void)[] = [];
|
|
2469
|
-
let frameRelayed = false;
|
|
2470
3377
|
|
|
2471
3378
|
function frameTrampoline(a0: i32): void {
|
|
2472
3379
|
if (frameListeners.length == 0) return;
|
|
@@ -2476,42 +3383,13 @@ function frameTrampoline(a0: i32): void {
|
|
|
2476
3383
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2477
3384
|
}
|
|
2478
3385
|
|
|
2479
|
-
const
|
|
2480
|
-
let killRelayed = false;
|
|
3386
|
+
const suicideListeners: ((event: ClientKillEvent) => void)[] = [];
|
|
2481
3387
|
|
|
2482
|
-
function
|
|
2483
|
-
if (
|
|
3388
|
+
function suicideTrampoline(a0: i32): void {
|
|
3389
|
+
if (suicideListeners.length == 0) return;
|
|
2484
3390
|
const event = new ClientKillEvent(new Player(__nativeCell(0)));
|
|
2485
3391
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2486
|
-
const listeners =
|
|
2487
|
-
const ambient = __co_ambient_player;
|
|
2488
|
-
__co_ambient_player = a0;
|
|
2489
|
-
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2490
|
-
__co_ambient_player = ambient;
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
const PreThinkListeners: ((event: Client_PreThinkEvent) => void)[] = [];
|
|
2494
|
-
let PreThinkRelayed = false;
|
|
2495
|
-
|
|
2496
|
-
function PreThinkTrampoline(a0: i32): void {
|
|
2497
|
-
if (PreThinkListeners.length == 0) return;
|
|
2498
|
-
const event = new Client_PreThinkEvent(new Player(__nativeCell(0)));
|
|
2499
|
-
// A copy: a listener that removes itself must not make the next one skip.
|
|
2500
|
-
const listeners = PreThinkListeners.slice(0);
|
|
2501
|
-
const ambient = __co_ambient_player;
|
|
2502
|
-
__co_ambient_player = a0;
|
|
2503
|
-
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2504
|
-
__co_ambient_player = ambient;
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
const PostThinkListeners: ((event: Client_PostThinkEvent) => void)[] = [];
|
|
2508
|
-
let PostThinkRelayed = false;
|
|
2509
|
-
|
|
2510
|
-
function PostThinkTrampoline(a0: i32): void {
|
|
2511
|
-
if (PostThinkListeners.length == 0) return;
|
|
2512
|
-
const event = new Client_PostThinkEvent(new Player(__nativeCell(0)));
|
|
2513
|
-
// A copy: a listener that removes itself must not make the next one skip.
|
|
2514
|
-
const listeners = PostThinkListeners.slice(0);
|
|
3392
|
+
const listeners = suicideListeners.slice(0);
|
|
2515
3393
|
const ambient = __co_ambient_player;
|
|
2516
3394
|
__co_ambient_player = a0;
|
|
2517
3395
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
@@ -2519,7 +3397,6 @@ function PostThinkTrampoline(a0: i32): void {
|
|
|
2519
3397
|
}
|
|
2520
3398
|
|
|
2521
3399
|
const impulseListeners: ((event: ClientImpulseEvent) => void)[] = [];
|
|
2522
|
-
let impulseRelayed = false;
|
|
2523
3400
|
|
|
2524
3401
|
function impulseTrampoline(a0: i32): void {
|
|
2525
3402
|
if (impulseListeners.length == 0) return;
|
|
@@ -2533,7 +3410,6 @@ function impulseTrampoline(a0: i32): void {
|
|
|
2533
3410
|
}
|
|
2534
3411
|
|
|
2535
3412
|
const cmdStartListeners: ((event: ClientCmdStartEvent) => void)[] = [];
|
|
2536
|
-
let cmdStartRelayed = false;
|
|
2537
3413
|
|
|
2538
3414
|
function cmdStartTrampoline(a0: i32): void {
|
|
2539
3415
|
if (cmdStartListeners.length == 0) return;
|
|
@@ -2546,330 +3422,201 @@ function cmdStartTrampoline(a0: i32): void {
|
|
|
2546
3422
|
__co_ambient_player = ambient;
|
|
2547
3423
|
}
|
|
2548
3424
|
|
|
2549
|
-
const
|
|
2550
|
-
let pfnThinkRelayed = false;
|
|
3425
|
+
const entityThinkListeners: ((event: PfnThinkEvent) => void)[] = [];
|
|
2551
3426
|
|
|
2552
|
-
function
|
|
2553
|
-
if (
|
|
3427
|
+
function entityThinkTrampoline(a0: i32): void {
|
|
3428
|
+
if (entityThinkListeners.length == 0) return;
|
|
2554
3429
|
const event = new PfnThinkEvent(<f64>__nativeCell(0));
|
|
2555
3430
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2556
|
-
const listeners =
|
|
3431
|
+
const listeners = entityThinkListeners.slice(0);
|
|
2557
3432
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2558
3433
|
}
|
|
2559
3434
|
|
|
2560
|
-
const
|
|
2561
|
-
let pfnPlaybackeventRelayed = false;
|
|
3435
|
+
const playbackEventListeners: ((event: PfnPlaybackeventEvent) => void)[] = [];
|
|
2562
3436
|
|
|
2563
|
-
function
|
|
2564
|
-
if (
|
|
3437
|
+
function playbackEventTrampoline(a0: i32): void {
|
|
3438
|
+
if (playbackEventListeners.length == 0) return;
|
|
2565
3439
|
const event = new PfnPlaybackeventEvent(<f64>__nativeCell(0), <f64>__nativeCell(1), <f64>__nativeCell(2), <f64>reinterpret<f32>(__nativeCell(3)), __nativeVector(4), __nativeVector(5), <f64>reinterpret<f32>(__nativeCell(6)), <f64>reinterpret<f32>(__nativeCell(7)), <f64>__nativeCell(8), <f64>__nativeCell(9), <f64>__nativeCell(10), <f64>__nativeCell(11));
|
|
2566
3440
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2567
|
-
const listeners =
|
|
3441
|
+
const listeners = playbackEventListeners.slice(0);
|
|
2568
3442
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2569
3443
|
}
|
|
2570
3444
|
|
|
2571
|
-
const
|
|
2572
|
-
let pfnKeyvalueRelayed = false;
|
|
3445
|
+
const keyValueListeners: ((event: PfnKeyvalueEvent) => void)[] = [];
|
|
2573
3446
|
|
|
2574
|
-
function
|
|
2575
|
-
if (
|
|
3447
|
+
function keyValueTrampoline(a0: i32): void {
|
|
3448
|
+
if (keyValueListeners.length == 0) return;
|
|
2576
3449
|
const event = new PfnKeyvalueEvent(<f64>__nativeCell(0));
|
|
2577
3450
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2578
|
-
const listeners =
|
|
3451
|
+
const listeners = keyValueListeners.slice(0);
|
|
2579
3452
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2580
3453
|
}
|
|
2581
3454
|
|
|
2582
|
-
const
|
|
2583
|
-
let pfnSpawnRelayed = false;
|
|
3455
|
+
const entitySpawnListeners: ((event: PfnSpawnEvent) => void)[] = [];
|
|
2584
3456
|
|
|
2585
|
-
function
|
|
2586
|
-
if (
|
|
3457
|
+
function entitySpawnTrampoline(a0: i32): void {
|
|
3458
|
+
if (entitySpawnListeners.length == 0) return;
|
|
2587
3459
|
const event = new PfnSpawnEvent(<f64>__nativeCell(0));
|
|
2588
3460
|
// A copy: a listener that removes itself must not make the next one skip.
|
|
2589
|
-
const listeners =
|
|
3461
|
+
const listeners = entitySpawnListeners.slice(0);
|
|
2590
3462
|
for (let i = 0; i < listeners.length; i++) listeners[i](event);
|
|
2591
3463
|
}
|
|
2592
3464
|
|
|
2593
3465
|
/** Adds a listener for the event E - server.addEventListener's hood. */
|
|
2594
3466
|
export function addServerListener<E>(listener: (event: E) => void): void {
|
|
2595
3467
|
if (idof<E>() == idof<PluginInitEvent>()) {
|
|
3468
|
+
if (initListeners.length == 0) _on("plugin_init", initTrampoline.index, 0);
|
|
2596
3469
|
initListeners.push(changetype<(event: PluginInitEvent) => void>(listener));
|
|
2597
|
-
if (!initRelayed) {
|
|
2598
|
-
initRelayed = true;
|
|
2599
|
-
_on("plugin_init", initTrampoline.index, 0);
|
|
2600
|
-
}
|
|
2601
3470
|
return;
|
|
2602
3471
|
}
|
|
2603
3472
|
if (idof<E>() == idof<PluginPauseEvent>()) {
|
|
3473
|
+
if (pauseListeners.length == 0) _on("plugin_pause", pauseTrampoline.index, 0);
|
|
2604
3474
|
pauseListeners.push(changetype<(event: PluginPauseEvent) => void>(listener));
|
|
2605
|
-
if (!pauseRelayed) {
|
|
2606
|
-
pauseRelayed = true;
|
|
2607
|
-
_on("plugin_pause", pauseTrampoline.index, 0);
|
|
2608
|
-
}
|
|
2609
3475
|
return;
|
|
2610
3476
|
}
|
|
2611
3477
|
if (idof<E>() == idof<PluginUnpauseEvent>()) {
|
|
3478
|
+
if (unpauseListeners.length == 0) _on("plugin_unpause", unpauseTrampoline.index, 0);
|
|
2612
3479
|
unpauseListeners.push(changetype<(event: PluginUnpauseEvent) => void>(listener));
|
|
2613
|
-
if (!unpauseRelayed) {
|
|
2614
|
-
unpauseRelayed = true;
|
|
2615
|
-
_on("plugin_unpause", unpauseTrampoline.index, 0);
|
|
2616
|
-
}
|
|
2617
3480
|
return;
|
|
2618
3481
|
}
|
|
2619
3482
|
if (idof<E>() == idof<ServerChangelevelEvent>()) {
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
changelevelRelayed = true;
|
|
2623
|
-
_on("server_changelevel", changelevelTrampoline.index, 0);
|
|
2624
|
-
}
|
|
3483
|
+
if (changeLevelListeners.length == 0) _on("server_changelevel", changeLevelTrampoline.index, 0);
|
|
3484
|
+
changeLevelListeners.push(changetype<(event: ServerChangelevelEvent) => void>(listener));
|
|
2625
3485
|
return;
|
|
2626
3486
|
}
|
|
2627
3487
|
if (idof<E>() == idof<PluginCfgEvent>()) {
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
cfgRelayed = true;
|
|
2631
|
-
_on("plugin_cfg", cfgTrampoline.index, 0);
|
|
2632
|
-
}
|
|
3488
|
+
if (pluginsLoadedListeners.length == 0) _on("plugin_cfg", pluginsLoadedTrampoline.index, 0);
|
|
3489
|
+
pluginsLoadedListeners.push(changetype<(event: PluginCfgEvent) => void>(listener));
|
|
2633
3490
|
return;
|
|
2634
3491
|
}
|
|
2635
3492
|
if (idof<E>() == idof<PluginEndEvent>()) {
|
|
3493
|
+
if (endListeners.length == 0) _on("plugin_end", endTrampoline.index, 0);
|
|
2636
3494
|
endListeners.push(changetype<(event: PluginEndEvent) => void>(listener));
|
|
2637
|
-
if (!endRelayed) {
|
|
2638
|
-
endRelayed = true;
|
|
2639
|
-
_on("plugin_end", endTrampoline.index, 0);
|
|
2640
|
-
}
|
|
2641
3495
|
return;
|
|
2642
3496
|
}
|
|
2643
3497
|
if (idof<E>() == idof<PluginLogEvent>()) {
|
|
3498
|
+
if (logListeners.length == 0) _on("plugin_log", logTrampoline.index, 0);
|
|
2644
3499
|
logListeners.push(changetype<(event: PluginLogEvent) => void>(listener));
|
|
2645
|
-
if (!logRelayed) {
|
|
2646
|
-
logRelayed = true;
|
|
2647
|
-
_on("plugin_log", logTrampoline.index, 0);
|
|
2648
|
-
}
|
|
2649
3500
|
return;
|
|
2650
3501
|
}
|
|
2651
3502
|
if (idof<E>() == idof<PluginPrecacheEvent>()) {
|
|
3503
|
+
if (precacheListeners.length == 0) _on("plugin_precache", precacheTrampoline.index, 0);
|
|
2652
3504
|
precacheListeners.push(changetype<(event: PluginPrecacheEvent) => void>(listener));
|
|
2653
|
-
if (!precacheRelayed) {
|
|
2654
|
-
precacheRelayed = true;
|
|
2655
|
-
_on("plugin_precache", precacheTrampoline.index, 0);
|
|
2656
|
-
}
|
|
2657
3505
|
return;
|
|
2658
3506
|
}
|
|
2659
3507
|
if (idof<E>() == idof<ClientInfochangedEvent>()) {
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
infochangedRelayed = true;
|
|
2663
|
-
_on("client_infochanged", infochangedTrampoline.index, 0);
|
|
2664
|
-
}
|
|
3508
|
+
if (clientInfochangedListeners.length == 0) _on("client_infochanged", clientInfochangedTrampoline.index, 0);
|
|
3509
|
+
clientInfochangedListeners.push(changetype<(event: ClientInfochangedEvent) => void>(listener));
|
|
2665
3510
|
return;
|
|
2666
3511
|
}
|
|
2667
3512
|
if (idof<E>() == idof<ClientConnectEvent>()) {
|
|
3513
|
+
if (connectListeners.length == 0) _on("client_connect", connectTrampoline.index, 0);
|
|
2668
3514
|
connectListeners.push(changetype<(event: ClientConnectEvent) => void>(listener));
|
|
2669
|
-
if (!connectRelayed) {
|
|
2670
|
-
connectRelayed = true;
|
|
2671
|
-
_on("client_connect", connectTrampoline.index, 0);
|
|
2672
|
-
}
|
|
2673
3515
|
return;
|
|
2674
3516
|
}
|
|
2675
3517
|
if (idof<E>() == idof<ClientConnectexEvent>()) {
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
connectexRelayed = true;
|
|
2679
|
-
_on("client_connectex", connectexTrampoline.index, 0);
|
|
2680
|
-
}
|
|
3518
|
+
if (connectAttemptListeners.length == 0) _on("client_connectex", connectAttemptTrampoline.index, 0);
|
|
3519
|
+
connectAttemptListeners.push(changetype<(event: ClientConnectexEvent) => void>(listener));
|
|
2681
3520
|
return;
|
|
2682
3521
|
}
|
|
2683
3522
|
if (idof<E>() == idof<ClientAuthorizedEvent>()) {
|
|
3523
|
+
if (authorizedListeners.length == 0) _on("client_authorized", authorizedTrampoline.index, 0);
|
|
2684
3524
|
authorizedListeners.push(changetype<(event: ClientAuthorizedEvent) => void>(listener));
|
|
2685
|
-
if (!authorizedRelayed) {
|
|
2686
|
-
authorizedRelayed = true;
|
|
2687
|
-
_on("client_authorized", authorizedTrampoline.index, 0);
|
|
2688
|
-
}
|
|
2689
|
-
return;
|
|
2690
|
-
}
|
|
2691
|
-
if (idof<E>() == idof<ClientDisconnectEvent>()) {
|
|
2692
|
-
disconnectListeners.push(changetype<(event: ClientDisconnectEvent) => void>(listener));
|
|
2693
|
-
if (!disconnectRelayed) {
|
|
2694
|
-
disconnectRelayed = true;
|
|
2695
|
-
_on("client_disconnect", disconnectTrampoline.index, 0);
|
|
2696
|
-
}
|
|
2697
3525
|
return;
|
|
2698
3526
|
}
|
|
2699
3527
|
if (idof<E>() == idof<ClientDisconnectedEvent>()) {
|
|
3528
|
+
if (disconnectedListeners.length == 0) _on("client_disconnected", disconnectedTrampoline.index, 0);
|
|
2700
3529
|
disconnectedListeners.push(changetype<(event: ClientDisconnectedEvent) => void>(listener));
|
|
2701
|
-
if (!disconnectedRelayed) {
|
|
2702
|
-
disconnectedRelayed = true;
|
|
2703
|
-
_on("client_disconnected", disconnectedTrampoline.index, 0);
|
|
2704
|
-
}
|
|
2705
3530
|
return;
|
|
2706
3531
|
}
|
|
2707
3532
|
if (idof<E>() == idof<ClientRemoveEvent>()) {
|
|
3533
|
+
if (removeListeners.length == 0) _on("client_remove", removeTrampoline.index, 0);
|
|
2708
3534
|
removeListeners.push(changetype<(event: ClientRemoveEvent) => void>(listener));
|
|
2709
|
-
if (!removeRelayed) {
|
|
2710
|
-
removeRelayed = true;
|
|
2711
|
-
_on("client_remove", removeTrampoline.index, 0);
|
|
2712
|
-
}
|
|
2713
3535
|
return;
|
|
2714
3536
|
}
|
|
2715
3537
|
if (idof<E>() == idof<ClientCommandEvent>()) {
|
|
3538
|
+
if (commandListeners.length == 0) _on("client_command", commandTrampoline.index, 0);
|
|
2716
3539
|
commandListeners.push(changetype<(event: ClientCommandEvent) => void>(listener));
|
|
2717
|
-
if (!commandRelayed) {
|
|
2718
|
-
commandRelayed = true;
|
|
2719
|
-
_on("client_command", commandTrampoline.index, 0);
|
|
2720
|
-
}
|
|
2721
3540
|
return;
|
|
2722
3541
|
}
|
|
2723
3542
|
if (idof<E>() == idof<ClientPutinserverEvent>()) {
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
putinserverRelayed = true;
|
|
2727
|
-
_on("client_putinserver", putinserverTrampoline.index, 0);
|
|
2728
|
-
}
|
|
3543
|
+
if (putInServerListeners.length == 0) _on("client_putinserver", putInServerTrampoline.index, 0);
|
|
3544
|
+
putInServerListeners.push(changetype<(event: ClientPutinserverEvent) => void>(listener));
|
|
2729
3545
|
return;
|
|
2730
3546
|
}
|
|
2731
3547
|
if (idof<E>() == idof<InconsistentFileEvent>()) {
|
|
3548
|
+
if (inconsistentFileListeners.length == 0) _on("inconsistent_file", inconsistentFileTrampoline.index, 0);
|
|
2732
3549
|
inconsistentFileListeners.push(changetype<(event: InconsistentFileEvent) => void>(listener));
|
|
2733
|
-
if (!inconsistentFileRelayed) {
|
|
2734
|
-
inconsistentFileRelayed = true;
|
|
2735
|
-
_on("inconsistent_file", inconsistentFileTrampoline.index, 0);
|
|
2736
|
-
}
|
|
2737
3550
|
return;
|
|
2738
3551
|
}
|
|
2739
3552
|
if (idof<E>() == idof<PluginModulesEvent>()) {
|
|
3553
|
+
if (modulesListeners.length == 0) _on("plugin_modules", modulesTrampoline.index, 0);
|
|
2740
3554
|
modulesListeners.push(changetype<(event: PluginModulesEvent) => void>(listener));
|
|
2741
|
-
if (!modulesRelayed) {
|
|
2742
|
-
modulesRelayed = true;
|
|
2743
|
-
_on("plugin_modules", modulesTrampoline.index, 0);
|
|
2744
|
-
}
|
|
2745
3555
|
return;
|
|
2746
3556
|
}
|
|
2747
3557
|
if (idof<E>() == idof<OnConfigsExecutedEvent>()) {
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
OnConfigsExecutedRelayed = true;
|
|
2751
|
-
_on("OnConfigsExecuted", OnConfigsExecutedTrampoline.index, 0);
|
|
2752
|
-
}
|
|
3558
|
+
if (configsExecutedListeners.length == 0) _on("OnConfigsExecuted", configsExecutedTrampoline.index, 0);
|
|
3559
|
+
configsExecutedListeners.push(changetype<(event: OnConfigsExecutedEvent) => void>(listener));
|
|
2753
3560
|
return;
|
|
2754
3561
|
}
|
|
2755
3562
|
if (idof<E>() == idof<OnAutoConfigsBufferedEvent>()) {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
OnAutoConfigsBufferedRelayed = true;
|
|
2759
|
-
_on("OnAutoConfigsBuffered", OnAutoConfigsBufferedTrampoline.index, 0);
|
|
2760
|
-
}
|
|
3563
|
+
if (configsQueuedListeners.length == 0) _on("OnAutoConfigsBuffered", configsQueuedTrampoline.index, 0);
|
|
3564
|
+
configsQueuedListeners.push(changetype<(event: OnAutoConfigsBufferedEvent) => void>(listener));
|
|
2761
3565
|
return;
|
|
2762
3566
|
}
|
|
2763
3567
|
if (idof<E>() == idof<CS_InternalCommandEvent>()) {
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
CS_InternalCommandRelayed = true;
|
|
2767
|
-
_on("CS_InternalCommand", CS_InternalCommandTrampoline.index, 0);
|
|
2768
|
-
}
|
|
3568
|
+
if (internalCommandListeners.length == 0) _on("CS_InternalCommand", internalCommandTrampoline.index, 0);
|
|
3569
|
+
internalCommandListeners.push(changetype<(event: CS_InternalCommandEvent) => void>(listener));
|
|
2769
3570
|
return;
|
|
2770
3571
|
}
|
|
2771
3572
|
if (idof<E>() == idof<CS_OnBuyAttemptEvent>()) {
|
|
3573
|
+
if (CS_OnBuyAttemptListeners.length == 0) _on("CS_OnBuyAttempt", CS_OnBuyAttemptTrampoline.index, 0);
|
|
2772
3574
|
CS_OnBuyAttemptListeners.push(changetype<(event: CS_OnBuyAttemptEvent) => void>(listener));
|
|
2773
|
-
if (!CS_OnBuyAttemptRelayed) {
|
|
2774
|
-
CS_OnBuyAttemptRelayed = true;
|
|
2775
|
-
_on("CS_OnBuyAttempt", CS_OnBuyAttemptTrampoline.index, 0);
|
|
2776
|
-
}
|
|
2777
3575
|
return;
|
|
2778
3576
|
}
|
|
2779
3577
|
if (idof<E>() == idof<CS_OnBuyEvent>()) {
|
|
3578
|
+
if (CS_OnBuyListeners.length == 0) _on("CS_OnBuy", CS_OnBuyTrampoline.index, 0);
|
|
2780
3579
|
CS_OnBuyListeners.push(changetype<(event: CS_OnBuyEvent) => void>(listener));
|
|
2781
|
-
if (!CS_OnBuyRelayed) {
|
|
2782
|
-
CS_OnBuyRelayed = true;
|
|
2783
|
-
_on("CS_OnBuy", CS_OnBuyTrampoline.index, 0);
|
|
2784
|
-
}
|
|
2785
|
-
return;
|
|
2786
|
-
}
|
|
2787
|
-
if (idof<E>() == idof<PfnTouchEvent>()) {
|
|
2788
|
-
pfnTouchListeners.push(changetype<(event: PfnTouchEvent) => void>(listener));
|
|
2789
|
-
if (!pfnTouchRelayed) {
|
|
2790
|
-
pfnTouchRelayed = true;
|
|
2791
|
-
_on("pfn_touch", pfnTouchTrampoline.index, 0);
|
|
2792
|
-
}
|
|
2793
3580
|
return;
|
|
2794
3581
|
}
|
|
2795
3582
|
if (idof<E>() == idof<ServerFrameEvent>()) {
|
|
3583
|
+
if (frameListeners.length == 0) _on("server_frame", frameTrampoline.index, 0);
|
|
2796
3584
|
frameListeners.push(changetype<(event: ServerFrameEvent) => void>(listener));
|
|
2797
|
-
if (!frameRelayed) {
|
|
2798
|
-
frameRelayed = true;
|
|
2799
|
-
_on("server_frame", frameTrampoline.index, 0);
|
|
2800
|
-
}
|
|
2801
3585
|
return;
|
|
2802
3586
|
}
|
|
2803
3587
|
if (idof<E>() == idof<ClientKillEvent>()) {
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
killRelayed = true;
|
|
2807
|
-
_on("client_kill", killTrampoline.index, 0);
|
|
2808
|
-
}
|
|
2809
|
-
return;
|
|
2810
|
-
}
|
|
2811
|
-
if (idof<E>() == idof<Client_PreThinkEvent>()) {
|
|
2812
|
-
PreThinkListeners.push(changetype<(event: Client_PreThinkEvent) => void>(listener));
|
|
2813
|
-
if (!PreThinkRelayed) {
|
|
2814
|
-
PreThinkRelayed = true;
|
|
2815
|
-
_on("client_PreThink", PreThinkTrampoline.index, 0);
|
|
2816
|
-
}
|
|
2817
|
-
return;
|
|
2818
|
-
}
|
|
2819
|
-
if (idof<E>() == idof<Client_PostThinkEvent>()) {
|
|
2820
|
-
PostThinkListeners.push(changetype<(event: Client_PostThinkEvent) => void>(listener));
|
|
2821
|
-
if (!PostThinkRelayed) {
|
|
2822
|
-
PostThinkRelayed = true;
|
|
2823
|
-
_on("client_PostThink", PostThinkTrampoline.index, 0);
|
|
2824
|
-
}
|
|
3588
|
+
if (suicideListeners.length == 0) _on("client_kill", suicideTrampoline.index, 0);
|
|
3589
|
+
suicideListeners.push(changetype<(event: ClientKillEvent) => void>(listener));
|
|
2825
3590
|
return;
|
|
2826
3591
|
}
|
|
2827
3592
|
if (idof<E>() == idof<ClientImpulseEvent>()) {
|
|
3593
|
+
if (impulseListeners.length == 0) _on("client_impulse", impulseTrampoline.index, 0);
|
|
2828
3594
|
impulseListeners.push(changetype<(event: ClientImpulseEvent) => void>(listener));
|
|
2829
|
-
if (!impulseRelayed) {
|
|
2830
|
-
impulseRelayed = true;
|
|
2831
|
-
_on("client_impulse", impulseTrampoline.index, 0);
|
|
2832
|
-
}
|
|
2833
3595
|
return;
|
|
2834
3596
|
}
|
|
2835
3597
|
if (idof<E>() == idof<ClientCmdStartEvent>()) {
|
|
3598
|
+
if (cmdStartListeners.length == 0) _on("client_cmdStart", cmdStartTrampoline.index, 0);
|
|
2836
3599
|
cmdStartListeners.push(changetype<(event: ClientCmdStartEvent) => void>(listener));
|
|
2837
|
-
if (!cmdStartRelayed) {
|
|
2838
|
-
cmdStartRelayed = true;
|
|
2839
|
-
_on("client_cmdStart", cmdStartTrampoline.index, 0);
|
|
2840
|
-
}
|
|
2841
3600
|
return;
|
|
2842
3601
|
}
|
|
2843
3602
|
if (idof<E>() == idof<PfnThinkEvent>()) {
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
pfnThinkRelayed = true;
|
|
2847
|
-
_on("pfn_think", pfnThinkTrampoline.index, 0);
|
|
2848
|
-
}
|
|
3603
|
+
if (entityThinkListeners.length == 0) _on("pfn_think", entityThinkTrampoline.index, 0);
|
|
3604
|
+
entityThinkListeners.push(changetype<(event: PfnThinkEvent) => void>(listener));
|
|
2849
3605
|
return;
|
|
2850
3606
|
}
|
|
2851
3607
|
if (idof<E>() == idof<PfnPlaybackeventEvent>()) {
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
pfnPlaybackeventRelayed = true;
|
|
2855
|
-
_on("pfn_playbackevent", pfnPlaybackeventTrampoline.index, 0);
|
|
2856
|
-
}
|
|
3608
|
+
if (playbackEventListeners.length == 0) _on("pfn_playbackevent", playbackEventTrampoline.index, 0);
|
|
3609
|
+
playbackEventListeners.push(changetype<(event: PfnPlaybackeventEvent) => void>(listener));
|
|
2857
3610
|
return;
|
|
2858
3611
|
}
|
|
2859
3612
|
if (idof<E>() == idof<PfnKeyvalueEvent>()) {
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
pfnKeyvalueRelayed = true;
|
|
2863
|
-
_on("pfn_keyvalue", pfnKeyvalueTrampoline.index, 0);
|
|
2864
|
-
}
|
|
3613
|
+
if (keyValueListeners.length == 0) _on("pfn_keyvalue", keyValueTrampoline.index, 0);
|
|
3614
|
+
keyValueListeners.push(changetype<(event: PfnKeyvalueEvent) => void>(listener));
|
|
2865
3615
|
return;
|
|
2866
3616
|
}
|
|
2867
3617
|
if (idof<E>() == idof<PfnSpawnEvent>()) {
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
pfnSpawnRelayed = true;
|
|
2871
|
-
_on("pfn_spawn", pfnSpawnTrampoline.index, 0);
|
|
2872
|
-
}
|
|
3618
|
+
if (entitySpawnListeners.length == 0) _on("pfn_spawn", entitySpawnTrampoline.index, 0);
|
|
3619
|
+
entitySpawnListeners.push(changetype<(event: PfnSpawnEvent) => void>(listener));
|
|
2873
3620
|
return;
|
|
2874
3621
|
}
|
|
2875
3622
|
}
|
|
@@ -2878,177 +3625,219 @@ export function addServerListener<E>(listener: (event: E) => void): void {
|
|
|
2878
3625
|
export function removeServerListener<E>(listener: (event: E) => void): void {
|
|
2879
3626
|
if (idof<E>() == idof<PluginInitEvent>()) {
|
|
2880
3627
|
const at = initListeners.indexOf(changetype<(event: PluginInitEvent) => void>(listener));
|
|
2881
|
-
if (at
|
|
3628
|
+
if (at < 0) return;
|
|
3629
|
+
initListeners.splice(at, 1);
|
|
3630
|
+
if (initListeners.length == 0) __off("plugin_init", initTrampoline.index);
|
|
2882
3631
|
return;
|
|
2883
3632
|
}
|
|
2884
3633
|
if (idof<E>() == idof<PluginPauseEvent>()) {
|
|
2885
3634
|
const at = pauseListeners.indexOf(changetype<(event: PluginPauseEvent) => void>(listener));
|
|
2886
|
-
if (at
|
|
3635
|
+
if (at < 0) return;
|
|
3636
|
+
pauseListeners.splice(at, 1);
|
|
3637
|
+
if (pauseListeners.length == 0) __off("plugin_pause", pauseTrampoline.index);
|
|
2887
3638
|
return;
|
|
2888
3639
|
}
|
|
2889
3640
|
if (idof<E>() == idof<PluginUnpauseEvent>()) {
|
|
2890
3641
|
const at = unpauseListeners.indexOf(changetype<(event: PluginUnpauseEvent) => void>(listener));
|
|
2891
|
-
if (at
|
|
3642
|
+
if (at < 0) return;
|
|
3643
|
+
unpauseListeners.splice(at, 1);
|
|
3644
|
+
if (unpauseListeners.length == 0) __off("plugin_unpause", unpauseTrampoline.index);
|
|
2892
3645
|
return;
|
|
2893
3646
|
}
|
|
2894
3647
|
if (idof<E>() == idof<ServerChangelevelEvent>()) {
|
|
2895
|
-
const at =
|
|
2896
|
-
if (at
|
|
3648
|
+
const at = changeLevelListeners.indexOf(changetype<(event: ServerChangelevelEvent) => void>(listener));
|
|
3649
|
+
if (at < 0) return;
|
|
3650
|
+
changeLevelListeners.splice(at, 1);
|
|
3651
|
+
if (changeLevelListeners.length == 0) __off("server_changelevel", changeLevelTrampoline.index);
|
|
2897
3652
|
return;
|
|
2898
3653
|
}
|
|
2899
3654
|
if (idof<E>() == idof<PluginCfgEvent>()) {
|
|
2900
|
-
const at =
|
|
2901
|
-
if (at
|
|
3655
|
+
const at = pluginsLoadedListeners.indexOf(changetype<(event: PluginCfgEvent) => void>(listener));
|
|
3656
|
+
if (at < 0) return;
|
|
3657
|
+
pluginsLoadedListeners.splice(at, 1);
|
|
3658
|
+
if (pluginsLoadedListeners.length == 0) __off("plugin_cfg", pluginsLoadedTrampoline.index);
|
|
2902
3659
|
return;
|
|
2903
3660
|
}
|
|
2904
3661
|
if (idof<E>() == idof<PluginEndEvent>()) {
|
|
2905
3662
|
const at = endListeners.indexOf(changetype<(event: PluginEndEvent) => void>(listener));
|
|
2906
|
-
if (at
|
|
3663
|
+
if (at < 0) return;
|
|
3664
|
+
endListeners.splice(at, 1);
|
|
3665
|
+
if (endListeners.length == 0) __off("plugin_end", endTrampoline.index);
|
|
2907
3666
|
return;
|
|
2908
3667
|
}
|
|
2909
3668
|
if (idof<E>() == idof<PluginLogEvent>()) {
|
|
2910
3669
|
const at = logListeners.indexOf(changetype<(event: PluginLogEvent) => void>(listener));
|
|
2911
|
-
if (at
|
|
3670
|
+
if (at < 0) return;
|
|
3671
|
+
logListeners.splice(at, 1);
|
|
3672
|
+
if (logListeners.length == 0) __off("plugin_log", logTrampoline.index);
|
|
2912
3673
|
return;
|
|
2913
3674
|
}
|
|
2914
3675
|
if (idof<E>() == idof<PluginPrecacheEvent>()) {
|
|
2915
3676
|
const at = precacheListeners.indexOf(changetype<(event: PluginPrecacheEvent) => void>(listener));
|
|
2916
|
-
if (at
|
|
3677
|
+
if (at < 0) return;
|
|
3678
|
+
precacheListeners.splice(at, 1);
|
|
3679
|
+
if (precacheListeners.length == 0) __off("plugin_precache", precacheTrampoline.index);
|
|
2917
3680
|
return;
|
|
2918
3681
|
}
|
|
2919
3682
|
if (idof<E>() == idof<ClientInfochangedEvent>()) {
|
|
2920
|
-
const at =
|
|
2921
|
-
if (at
|
|
3683
|
+
const at = clientInfochangedListeners.indexOf(changetype<(event: ClientInfochangedEvent) => void>(listener));
|
|
3684
|
+
if (at < 0) return;
|
|
3685
|
+
clientInfochangedListeners.splice(at, 1);
|
|
3686
|
+
if (clientInfochangedListeners.length == 0) __off("client_infochanged", clientInfochangedTrampoline.index);
|
|
2922
3687
|
return;
|
|
2923
3688
|
}
|
|
2924
3689
|
if (idof<E>() == idof<ClientConnectEvent>()) {
|
|
2925
3690
|
const at = connectListeners.indexOf(changetype<(event: ClientConnectEvent) => void>(listener));
|
|
2926
|
-
if (at
|
|
3691
|
+
if (at < 0) return;
|
|
3692
|
+
connectListeners.splice(at, 1);
|
|
3693
|
+
if (connectListeners.length == 0) __off("client_connect", connectTrampoline.index);
|
|
2927
3694
|
return;
|
|
2928
3695
|
}
|
|
2929
3696
|
if (idof<E>() == idof<ClientConnectexEvent>()) {
|
|
2930
|
-
const at =
|
|
2931
|
-
if (at
|
|
3697
|
+
const at = connectAttemptListeners.indexOf(changetype<(event: ClientConnectexEvent) => void>(listener));
|
|
3698
|
+
if (at < 0) return;
|
|
3699
|
+
connectAttemptListeners.splice(at, 1);
|
|
3700
|
+
if (connectAttemptListeners.length == 0) __off("client_connectex", connectAttemptTrampoline.index);
|
|
2932
3701
|
return;
|
|
2933
3702
|
}
|
|
2934
3703
|
if (idof<E>() == idof<ClientAuthorizedEvent>()) {
|
|
2935
3704
|
const at = authorizedListeners.indexOf(changetype<(event: ClientAuthorizedEvent) => void>(listener));
|
|
2936
|
-
if (at
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
if (idof<E>() == idof<ClientDisconnectEvent>()) {
|
|
2940
|
-
const at = disconnectListeners.indexOf(changetype<(event: ClientDisconnectEvent) => void>(listener));
|
|
2941
|
-
if (at >= 0) disconnectListeners.splice(at, 1);
|
|
3705
|
+
if (at < 0) return;
|
|
3706
|
+
authorizedListeners.splice(at, 1);
|
|
3707
|
+
if (authorizedListeners.length == 0) __off("client_authorized", authorizedTrampoline.index);
|
|
2942
3708
|
return;
|
|
2943
3709
|
}
|
|
2944
3710
|
if (idof<E>() == idof<ClientDisconnectedEvent>()) {
|
|
2945
3711
|
const at = disconnectedListeners.indexOf(changetype<(event: ClientDisconnectedEvent) => void>(listener));
|
|
2946
|
-
if (at
|
|
3712
|
+
if (at < 0) return;
|
|
3713
|
+
disconnectedListeners.splice(at, 1);
|
|
3714
|
+
if (disconnectedListeners.length == 0) __off("client_disconnected", disconnectedTrampoline.index);
|
|
2947
3715
|
return;
|
|
2948
3716
|
}
|
|
2949
3717
|
if (idof<E>() == idof<ClientRemoveEvent>()) {
|
|
2950
3718
|
const at = removeListeners.indexOf(changetype<(event: ClientRemoveEvent) => void>(listener));
|
|
2951
|
-
if (at
|
|
3719
|
+
if (at < 0) return;
|
|
3720
|
+
removeListeners.splice(at, 1);
|
|
3721
|
+
if (removeListeners.length == 0) __off("client_remove", removeTrampoline.index);
|
|
2952
3722
|
return;
|
|
2953
3723
|
}
|
|
2954
3724
|
if (idof<E>() == idof<ClientCommandEvent>()) {
|
|
2955
3725
|
const at = commandListeners.indexOf(changetype<(event: ClientCommandEvent) => void>(listener));
|
|
2956
|
-
if (at
|
|
3726
|
+
if (at < 0) return;
|
|
3727
|
+
commandListeners.splice(at, 1);
|
|
3728
|
+
if (commandListeners.length == 0) __off("client_command", commandTrampoline.index);
|
|
2957
3729
|
return;
|
|
2958
3730
|
}
|
|
2959
3731
|
if (idof<E>() == idof<ClientPutinserverEvent>()) {
|
|
2960
|
-
const at =
|
|
2961
|
-
if (at
|
|
3732
|
+
const at = putInServerListeners.indexOf(changetype<(event: ClientPutinserverEvent) => void>(listener));
|
|
3733
|
+
if (at < 0) return;
|
|
3734
|
+
putInServerListeners.splice(at, 1);
|
|
3735
|
+
if (putInServerListeners.length == 0) __off("client_putinserver", putInServerTrampoline.index);
|
|
2962
3736
|
return;
|
|
2963
3737
|
}
|
|
2964
3738
|
if (idof<E>() == idof<InconsistentFileEvent>()) {
|
|
2965
3739
|
const at = inconsistentFileListeners.indexOf(changetype<(event: InconsistentFileEvent) => void>(listener));
|
|
2966
|
-
if (at
|
|
3740
|
+
if (at < 0) return;
|
|
3741
|
+
inconsistentFileListeners.splice(at, 1);
|
|
3742
|
+
if (inconsistentFileListeners.length == 0) __off("inconsistent_file", inconsistentFileTrampoline.index);
|
|
2967
3743
|
return;
|
|
2968
3744
|
}
|
|
2969
3745
|
if (idof<E>() == idof<PluginModulesEvent>()) {
|
|
2970
3746
|
const at = modulesListeners.indexOf(changetype<(event: PluginModulesEvent) => void>(listener));
|
|
2971
|
-
if (at
|
|
3747
|
+
if (at < 0) return;
|
|
3748
|
+
modulesListeners.splice(at, 1);
|
|
3749
|
+
if (modulesListeners.length == 0) __off("plugin_modules", modulesTrampoline.index);
|
|
2972
3750
|
return;
|
|
2973
3751
|
}
|
|
2974
3752
|
if (idof<E>() == idof<OnConfigsExecutedEvent>()) {
|
|
2975
|
-
const at =
|
|
2976
|
-
if (at
|
|
3753
|
+
const at = configsExecutedListeners.indexOf(changetype<(event: OnConfigsExecutedEvent) => void>(listener));
|
|
3754
|
+
if (at < 0) return;
|
|
3755
|
+
configsExecutedListeners.splice(at, 1);
|
|
3756
|
+
if (configsExecutedListeners.length == 0) __off("OnConfigsExecuted", configsExecutedTrampoline.index);
|
|
2977
3757
|
return;
|
|
2978
3758
|
}
|
|
2979
3759
|
if (idof<E>() == idof<OnAutoConfigsBufferedEvent>()) {
|
|
2980
|
-
const at =
|
|
2981
|
-
if (at
|
|
3760
|
+
const at = configsQueuedListeners.indexOf(changetype<(event: OnAutoConfigsBufferedEvent) => void>(listener));
|
|
3761
|
+
if (at < 0) return;
|
|
3762
|
+
configsQueuedListeners.splice(at, 1);
|
|
3763
|
+
if (configsQueuedListeners.length == 0) __off("OnAutoConfigsBuffered", configsQueuedTrampoline.index);
|
|
2982
3764
|
return;
|
|
2983
3765
|
}
|
|
2984
3766
|
if (idof<E>() == idof<CS_InternalCommandEvent>()) {
|
|
2985
|
-
const at =
|
|
2986
|
-
if (at
|
|
3767
|
+
const at = internalCommandListeners.indexOf(changetype<(event: CS_InternalCommandEvent) => void>(listener));
|
|
3768
|
+
if (at < 0) return;
|
|
3769
|
+
internalCommandListeners.splice(at, 1);
|
|
3770
|
+
if (internalCommandListeners.length == 0) __off("CS_InternalCommand", internalCommandTrampoline.index);
|
|
2987
3771
|
return;
|
|
2988
3772
|
}
|
|
2989
3773
|
if (idof<E>() == idof<CS_OnBuyAttemptEvent>()) {
|
|
2990
3774
|
const at = CS_OnBuyAttemptListeners.indexOf(changetype<(event: CS_OnBuyAttemptEvent) => void>(listener));
|
|
2991
|
-
if (at
|
|
3775
|
+
if (at < 0) return;
|
|
3776
|
+
CS_OnBuyAttemptListeners.splice(at, 1);
|
|
3777
|
+
if (CS_OnBuyAttemptListeners.length == 0) __off("CS_OnBuyAttempt", CS_OnBuyAttemptTrampoline.index);
|
|
2992
3778
|
return;
|
|
2993
3779
|
}
|
|
2994
3780
|
if (idof<E>() == idof<CS_OnBuyEvent>()) {
|
|
2995
3781
|
const at = CS_OnBuyListeners.indexOf(changetype<(event: CS_OnBuyEvent) => void>(listener));
|
|
2996
|
-
if (at
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
if (idof<E>() == idof<PfnTouchEvent>()) {
|
|
3000
|
-
const at = pfnTouchListeners.indexOf(changetype<(event: PfnTouchEvent) => void>(listener));
|
|
3001
|
-
if (at >= 0) pfnTouchListeners.splice(at, 1);
|
|
3782
|
+
if (at < 0) return;
|
|
3783
|
+
CS_OnBuyListeners.splice(at, 1);
|
|
3784
|
+
if (CS_OnBuyListeners.length == 0) __off("CS_OnBuy", CS_OnBuyTrampoline.index);
|
|
3002
3785
|
return;
|
|
3003
3786
|
}
|
|
3004
3787
|
if (idof<E>() == idof<ServerFrameEvent>()) {
|
|
3005
3788
|
const at = frameListeners.indexOf(changetype<(event: ServerFrameEvent) => void>(listener));
|
|
3006
|
-
if (at
|
|
3789
|
+
if (at < 0) return;
|
|
3790
|
+
frameListeners.splice(at, 1);
|
|
3791
|
+
if (frameListeners.length == 0) __off("server_frame", frameTrampoline.index);
|
|
3007
3792
|
return;
|
|
3008
3793
|
}
|
|
3009
3794
|
if (idof<E>() == idof<ClientKillEvent>()) {
|
|
3010
|
-
const at =
|
|
3011
|
-
if (at
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
if (idof<E>() == idof<Client_PreThinkEvent>()) {
|
|
3015
|
-
const at = PreThinkListeners.indexOf(changetype<(event: Client_PreThinkEvent) => void>(listener));
|
|
3016
|
-
if (at >= 0) PreThinkListeners.splice(at, 1);
|
|
3017
|
-
return;
|
|
3018
|
-
}
|
|
3019
|
-
if (idof<E>() == idof<Client_PostThinkEvent>()) {
|
|
3020
|
-
const at = PostThinkListeners.indexOf(changetype<(event: Client_PostThinkEvent) => void>(listener));
|
|
3021
|
-
if (at >= 0) PostThinkListeners.splice(at, 1);
|
|
3795
|
+
const at = suicideListeners.indexOf(changetype<(event: ClientKillEvent) => void>(listener));
|
|
3796
|
+
if (at < 0) return;
|
|
3797
|
+
suicideListeners.splice(at, 1);
|
|
3798
|
+
if (suicideListeners.length == 0) __off("client_kill", suicideTrampoline.index);
|
|
3022
3799
|
return;
|
|
3023
3800
|
}
|
|
3024
3801
|
if (idof<E>() == idof<ClientImpulseEvent>()) {
|
|
3025
3802
|
const at = impulseListeners.indexOf(changetype<(event: ClientImpulseEvent) => void>(listener));
|
|
3026
|
-
if (at
|
|
3803
|
+
if (at < 0) return;
|
|
3804
|
+
impulseListeners.splice(at, 1);
|
|
3805
|
+
if (impulseListeners.length == 0) __off("client_impulse", impulseTrampoline.index);
|
|
3027
3806
|
return;
|
|
3028
3807
|
}
|
|
3029
3808
|
if (idof<E>() == idof<ClientCmdStartEvent>()) {
|
|
3030
3809
|
const at = cmdStartListeners.indexOf(changetype<(event: ClientCmdStartEvent) => void>(listener));
|
|
3031
|
-
if (at
|
|
3810
|
+
if (at < 0) return;
|
|
3811
|
+
cmdStartListeners.splice(at, 1);
|
|
3812
|
+
if (cmdStartListeners.length == 0) __off("client_cmdStart", cmdStartTrampoline.index);
|
|
3032
3813
|
return;
|
|
3033
3814
|
}
|
|
3034
3815
|
if (idof<E>() == idof<PfnThinkEvent>()) {
|
|
3035
|
-
const at =
|
|
3036
|
-
if (at
|
|
3816
|
+
const at = entityThinkListeners.indexOf(changetype<(event: PfnThinkEvent) => void>(listener));
|
|
3817
|
+
if (at < 0) return;
|
|
3818
|
+
entityThinkListeners.splice(at, 1);
|
|
3819
|
+
if (entityThinkListeners.length == 0) __off("pfn_think", entityThinkTrampoline.index);
|
|
3037
3820
|
return;
|
|
3038
3821
|
}
|
|
3039
3822
|
if (idof<E>() == idof<PfnPlaybackeventEvent>()) {
|
|
3040
|
-
const at =
|
|
3041
|
-
if (at
|
|
3823
|
+
const at = playbackEventListeners.indexOf(changetype<(event: PfnPlaybackeventEvent) => void>(listener));
|
|
3824
|
+
if (at < 0) return;
|
|
3825
|
+
playbackEventListeners.splice(at, 1);
|
|
3826
|
+
if (playbackEventListeners.length == 0) __off("pfn_playbackevent", playbackEventTrampoline.index);
|
|
3042
3827
|
return;
|
|
3043
3828
|
}
|
|
3044
3829
|
if (idof<E>() == idof<PfnKeyvalueEvent>()) {
|
|
3045
|
-
const at =
|
|
3046
|
-
if (at
|
|
3830
|
+
const at = keyValueListeners.indexOf(changetype<(event: PfnKeyvalueEvent) => void>(listener));
|
|
3831
|
+
if (at < 0) return;
|
|
3832
|
+
keyValueListeners.splice(at, 1);
|
|
3833
|
+
if (keyValueListeners.length == 0) __off("pfn_keyvalue", keyValueTrampoline.index);
|
|
3047
3834
|
return;
|
|
3048
3835
|
}
|
|
3049
3836
|
if (idof<E>() == idof<PfnSpawnEvent>()) {
|
|
3050
|
-
const at =
|
|
3051
|
-
if (at
|
|
3837
|
+
const at = entitySpawnListeners.indexOf(changetype<(event: PfnSpawnEvent) => void>(listener));
|
|
3838
|
+
if (at < 0) return;
|
|
3839
|
+
entitySpawnListeners.splice(at, 1);
|
|
3840
|
+
if (entitySpawnListeners.length == 0) __off("pfn_spawn", entitySpawnTrampoline.index);
|
|
3052
3841
|
return;
|
|
3053
3842
|
}
|
|
3054
3843
|
}
|