@cybermp/client-types 2.2.2 → 2.3.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 ADDED
@@ -0,0 +1,56 @@
1
+ <h1 align="center">@cybermp/client-types</h1>
2
+
3
+ ✅ **Official** client-side type definitions for CyberMP multiplayer.
4
+
5
+ ## 🚀 Installation
6
+
7
+ Install the package as a development dependency:
8
+
9
+ With npm:
10
+ ```bash
11
+ npm install --save-dev @cybermp/client-types
12
+ ```
13
+
14
+ With pnpm:
15
+ ```bash
16
+ pnpm add -D @cybermp/client-types
17
+ ```
18
+
19
+ With yarn:
20
+ ```bash
21
+ yarn add -D @cybermp/client-types
22
+ ```
23
+
24
+ ## 🛠️ Configuration & Usage
25
+
26
+ To make TypeScript aware of the global `mp` variable, choose one of the following two approaches:
27
+
28
+ ### Approach 1: Global Declaration
29
+ Create a `global.d.ts` file in your source root (e.g., `src/global.d.ts`) to make the `mp` namespace available globally across your entire project without explicit imports.
30
+
31
+ ```typescript
32
+ import { MpClient } from '@cybermp/client-types';
33
+
34
+ declare global {
35
+ const mp: MpClient;
36
+ }
37
+ ```
38
+
39
+ > ⚠️ **Note:** Ensure your `tsconfig.json` includes your `global.d.ts` file (either via the `"include"` array or the `"files"` array) so the compiler picks up the definitions.
40
+
41
+ ### Approach 2: Scoped Local Variable
42
+ If you prefer to avoid polluting the global scope, you can create a local alias module (e.g., `src/mp.ts`) that links directly to `globalThis`.
43
+
44
+ ```typescript
45
+ import { MpClient } from '@cybermp/client-types';
46
+
47
+ export const mp = (globalThis as any).mp as MpClient;
48
+ ```
49
+
50
+ ## 📜 Documentation
51
+
52
+ You can find the full documentation [here](https://docs.cyber.mp).
53
+
54
+ ## ⚖️ License
55
+
56
+ Distributed under the MIT License. See [LICENSE](https://github.com/cyber-mp/cybermp-types/blob/main/LICENSE) for more information.
package/out/bitfields.ts CHANGED
@@ -14,35 +14,6 @@ export enum workWorkspotItemPolicy {
14
14
  "ItemPolicy_DespawnItemOnReaction" = 2
15
15
  }
16
16
 
17
- export enum TriggerChannel {
18
- "TC_Default" = 0,
19
- "TC_Player" = 1,
20
- "TC_Camera" = 2,
21
- "TC_Human" = 3,
22
- "TC_SoundReverbArea" = 4,
23
- "TC_SoundAmbientArea" = 5,
24
- "TC_Quest" = 6,
25
- "TC_Projectiles" = 7,
26
- "TC_Vehicle" = 8,
27
- "TC_Environment" = 9,
28
- "TC_WaterNullArea" = 10,
29
- "TC_Custom0" = 16,
30
- "TC_Custom1" = 17,
31
- "TC_Custom2" = 18,
32
- "TC_Custom3" = 19,
33
- "TC_Custom4" = 20,
34
- "TC_Custom5" = 21,
35
- "TC_Custom6" = 22,
36
- "TC_Custom7" = 23,
37
- "TC_Custom8" = 24,
38
- "TC_Custom9" = 25,
39
- "TC_Custom10" = 26,
40
- "TC_Custom11" = 27,
41
- "TC_Custom12" = 28,
42
- "TC_Custom13" = 29,
43
- "TC_Custom14" = 30
44
- }
45
-
46
17
  export enum scnChoiceNodeNsChoiceNodeBitFlags {
47
18
  "IsFocusClue" = 0,
48
19
  "IsValidInteractionFailsafeDisabled" = 1
@@ -63,12 +34,6 @@ export enum rendLightChannel {
63
34
  "LC_Automated" = 15
64
35
  }
65
36
 
66
- export enum RenderSceneLayerMask {
67
- "Default" = 0,
68
- "Cyberspace" = 1,
69
- "WorldMap" = 2
70
- }
71
-
72
37
  export enum physicsRagdollBodyPartE {
73
38
  "HEAD" = 0,
74
39
  "LARM_UPPER" = 1,
@@ -168,13 +133,6 @@ export enum gameEItemDynamicTags {
168
133
  "TransmogBlocked" = 3
169
134
  }
170
135
 
171
- export enum ETextureChannel {
172
- "TextureChannel_R" = 0,
173
- "TextureChannel_G" = 1,
174
- "TextureChannel_B" = 2,
175
- "TextureChannel_A" = 3
176
- }
177
-
178
136
  export enum entdismembermentWoundTypeE {
179
137
  "CLEAN" = 0,
180
138
  "COARSE" = 1,
@@ -213,6 +171,53 @@ export enum entdismembermentGoreTypeE {
213
171
  "CYBER" = 3
214
172
  }
215
173
 
174
+ export enum animMuteAnimEvents {
175
+ "STANDARD" = 0,
176
+ "FACE_ANIMS" = 1
177
+ }
178
+
179
+ export enum TriggerChannel {
180
+ "TC_Default" = 0,
181
+ "TC_Player" = 1,
182
+ "TC_Camera" = 2,
183
+ "TC_Human" = 3,
184
+ "TC_SoundReverbArea" = 4,
185
+ "TC_SoundAmbientArea" = 5,
186
+ "TC_Quest" = 6,
187
+ "TC_Projectiles" = 7,
188
+ "TC_Vehicle" = 8,
189
+ "TC_Environment" = 9,
190
+ "TC_WaterNullArea" = 10,
191
+ "TC_Custom0" = 16,
192
+ "TC_Custom1" = 17,
193
+ "TC_Custom2" = 18,
194
+ "TC_Custom3" = 19,
195
+ "TC_Custom4" = 20,
196
+ "TC_Custom5" = 21,
197
+ "TC_Custom6" = 22,
198
+ "TC_Custom7" = 23,
199
+ "TC_Custom8" = 24,
200
+ "TC_Custom9" = 25,
201
+ "TC_Custom10" = 26,
202
+ "TC_Custom11" = 27,
203
+ "TC_Custom12" = 28,
204
+ "TC_Custom13" = 29,
205
+ "TC_Custom14" = 30
206
+ }
207
+
208
+ export enum RenderSceneLayerMask {
209
+ "Default" = 0,
210
+ "Cyberspace" = 1,
211
+ "WorldMap" = 2
212
+ }
213
+
214
+ export enum ETextureChannel {
215
+ "TextureChannel_R" = 0,
216
+ "TextureChannel_G" = 1,
217
+ "TextureChannel_B" = 2,
218
+ "TextureChannel_A" = 3
219
+ }
220
+
216
221
  export enum EMeshChunkRenderMask {
217
222
  "MCR_Scene" = 0,
218
223
  "MCR_Cascade1" = 1,
@@ -247,8 +252,3 @@ export enum CensorshipFlags {
247
252
  "Censor_Religion" = 6,
248
253
  "Censor_Chinese" = 7
249
254
  }
250
-
251
- export enum animMuteAnimEvents {
252
- "STANDARD" = 0,
253
- "FACE_ANIMS" = 1
254
- }