@cybermp/client-types 2.2.1 → 2.2.2

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.
@@ -1,257 +1,558 @@
1
1
  import type * as CyberEnums from '../out/enums';
2
2
  import type {
3
+ Box,
3
4
  EulerAngles,
4
5
  entMorphTargetWeightEntry,
5
6
  MpClasses,
6
7
  Vector3,
7
8
  } from '../out/game';
8
9
 
10
+ /**
11
+ * Extracts the instance type from a class constructor type, or returns the type itself if it is not a constructor.
12
+ * @template T - The type to unwrap.
13
+ * @internal
14
+ */
9
15
  type UnwrapClass<T> = T extends { new (): infer U } ? U : T;
10
16
 
11
- type OverrideFunction = <
17
+ /**
18
+ * @internal
19
+ */
20
+ type AnyFunc = (...args: any[]) => any;
21
+
22
+ /**
23
+ * @internal
24
+ */
25
+ type SafeMethod<I, M extends keyof I> = I[M] extends AnyFunc ? I[M] : AnyFunc;
26
+
27
+ /**
28
+ * Defines a function signature used to completely override a method within a specified game class.
29
+ * The callback receives the instance (`self`), the original arguments, and the original method implementation as the final parameter.
30
+ * @template C - The class name key from `MpClasses`.
31
+ * @template I - The resolved instance type of the class.
32
+ * @template M - The method names available on the class instance.
33
+ */
34
+ export type OverrideFunction = <
12
35
  C extends keyof MpClasses,
13
36
  I extends UnwrapClass<MpClasses[C]>,
14
- M extends keyof I extends never ? string : keyof I,
37
+ M extends keyof I,
15
38
  >(
16
39
  className: C,
17
40
  methodName: M,
18
41
  callback: (
19
42
  self: I,
20
- ...args: [...Parameters<I[M]>, origin: I[M]]
21
- ) => ReturnType<I[M]>,
43
+ ...args: [...Parameters<SafeMethod<I, M>>, origin: SafeMethod<I, M>]
44
+ ) => ReturnType<SafeMethod<I, M>>,
22
45
  ) => void;
23
46
 
24
- type ObserveFunction = <
47
+ /**
48
+ * Defines a function signature used to observe (hook into) a method within a specified game class.
49
+ * The callback receives the instance (`self`) and the arguments passed to the method.
50
+ * @template C - The class name key from `MpClasses`.
51
+ * @template I - The resolved instance type of the class.
52
+ * @template M - The method names available on the class instance.
53
+ */
54
+ export type ObserveFunction = <
25
55
  C extends keyof MpClasses,
26
56
  I extends UnwrapClass<MpClasses[C]>,
27
- M extends keyof I extends never ? string : keyof I,
57
+ M extends keyof I,
28
58
  >(
29
59
  className: C,
30
60
  methodName: M,
31
- callback: (self: I, ...args: Parameters<I[M]>) => void,
61
+ callback: (self: I, ...args: Parameters<SafeMethod<I, M>>) => void,
32
62
  ) => void;
33
63
 
34
- interface TweakDB {
64
+ /**
65
+ * Interface for interacting with the game's TweakDB database.
66
+ * TweakDB contains static game data, tweaks, and entity configurations.
67
+ * @category Natives
68
+ */
69
+ export interface TweakDB {
70
+ /**
71
+ * Retrieves an array of records matching a specific query or record type.
72
+ * @template T - The expected type of the records.
73
+ * @param str - The TweakDB record path or type identifier.
74
+ * @returns An array of matching records.
75
+ */
35
76
  getRecords<T = any>(str: string): T[];
77
+
78
+ /**
79
+ * Retrieves a single record from TweakDB.
80
+ * @template T - The expected type of the record.
81
+ * @param str - The specific TweakDB ID or path string.
82
+ * @returns The requested record.
83
+ */
36
84
  getRecord<T = any>(str: string): T;
85
+
86
+ /**
87
+ * Queries TweakDB paths and returns matching entry keys.
88
+ * @param str - The search or query pattern string.
89
+ * @returns An array of matching string IDs.
90
+ */
37
91
  query(str: string): string[];
92
+
93
+ /**
94
+ * Retrieves a "flat" property value directly from TweakDB.
95
+ * @template T - The expected type of the flat property.
96
+ * @param str - The path to the flat property (e.g., "Items.SomeItem.someProperty").
97
+ * @returns The flat property value.
98
+ */
38
99
  getFlat<T = any>(str: string): T;
100
+
101
+ /**
102
+ * Overwrites an array flat property in TweakDB and updates the engine immediately.
103
+ * @param str - The path to the flat property.
104
+ * @param arr - The new array of values to assign.
105
+ * @returns `true` if the operation was successful, otherwise `false`.
106
+ */
39
107
  setFlats(str: string, arr: any[]): boolean;
108
+
109
+ /**
110
+ * Overwrites a single flat property value in TweakDB and updates the engine immediately.
111
+ * @param str - The path to the flat property.
112
+ * @param obj - The new value to assign.
113
+ * @returns `true` if the operation was successful, otherwise `false`.
114
+ */
40
115
  setFlat(str: string, obj: any): boolean;
116
+
117
+ /**
118
+ * Overwrites a flat property value in TweakDB *without* triggering an immediate engine update.
119
+ * Useful when batching multiple TweakDB edits before a manual refresh.
120
+ * @param str - The path to the flat property.
121
+ * @param obj - The new value to assign.
122
+ * @returns `true` if the operation was successful, otherwise `false`.
123
+ */
41
124
  setFlatNoUpdate(str: string, obj: any): boolean;
125
+
126
+ /**
127
+ * Forces the engine to re-read and update a specific record from its current TweakDB state.
128
+ * @param str - The path to the record to update.
129
+ * @returns `true` if the update succeeded, otherwise `false`.
130
+ */
42
131
  updateRecord(str: string): boolean;
132
+
133
+ /**
134
+ * Runtime creates a new TweakDB record.
135
+ * @param key - The new record identifier key.
136
+ * @param value - The record blueprint or type definition key.
137
+ * @returns `true` if creation succeeded, otherwise `false`.
138
+ */
43
139
  createRecord(key: string, value: string): boolean;
44
140
  }
45
141
 
46
- interface MultiplayerSystem {
142
+ /**
143
+ * Custom CyberMP System managing asset deletion maps, and basic spawn configurations.
144
+ * Accessible through `mp.game.ScriptGameInstance.GetMultiplayerSystem()`
145
+ * @category Natives
146
+ */
147
+ export class MultiplayerSystem {
47
148
  /**
48
- * Removes game object classes (e.g., T extends gameObject, playerPuppet, NpcPuppet) from the map.
49
- * @param objectClassMap Array of class names to delete.
149
+ * Removes game object classes (e.g., `GameObject`, `Door`) from the active multiplayer map state.
150
+ * @param objectClassMap - Array of class names from `MpClasses` to clear.
50
151
  */
51
152
  DeclareDeletedObjects(objectClassMap: Array<keyof MpClasses>): void;
52
153
 
53
154
  /**
54
- * Removes game objects by their unique hashes from the map.
55
- * @param objectHashMap Array of unique game object hashes to delete.
155
+ * Removes specific game objects from the network replication map using their unique hash keys.
156
+ * @param objectHashMap - Array of unique entity hashes to delete.
56
157
  */
57
158
  DeletedObjectsByUniqueHash(objectHashMap: string[]): void;
58
159
 
59
160
  /**
60
- * Enables or disables synchronization of default effects, as defined by the CyberMP platform.
61
- * @param value Whether to use the default effects.
161
+ * Enables or disables synchronization of default game effects, as defined by the CyberMP platform.
162
+ * @param value - `true` to utilize default synchronization effects, `false` to disable them.
62
163
  */
63
164
  UseDefaultEffectsByPlatform(value: boolean): void;
64
165
 
166
+ /**
167
+ * Sets the initial default coordinate and orientation fallback position when spawning players.
168
+ * @param position - The 3D coordinates vector.
169
+ * @param yaw - The horizontal rotation (yaw angle) in degrees/radians.
170
+ */
65
171
  SetDefaultSpawnPosition(position: Vector3, yaw: number): void;
66
172
  }
67
173
 
68
- import '../out/game.d.ts';
174
+ /**
175
+ * System providing status and progression access for the game's loading screen interface.
176
+ * Accessible through `mp.game.ScriptGameInstance.GetLoadingScreenSystem()`
177
+ * @category Natives
178
+ */
179
+ export class LoadingScreenSystem {
180
+ /**
181
+ * Retrieves the current explicit state of the loading screen lifecycle.
182
+ * @returns The state enum value.
183
+ */
184
+ GetLoadingScreenState(): CyberEnums.ELoadingScreenState;
69
185
 
70
- declare module '../out/game.d.ts' {
71
- export interface worldWeatherScriptInterface extends IScriptable {
72
- SetWeather(
73
- weather: CyberEnums.EWeatherState,
74
- blendTime?: number,
75
- priority?: number,
76
- ): void;
77
- ResetWeather(forceRestore?: boolean, blendTime?: number): void;
78
- GetWeatherState(): worldWeatherState;
79
- GetEnvironmentDefinition(): worldEnvironmentDefinition;
80
- }
186
+ /**
187
+ * Gets the numeric loading progression factor.
188
+ * @returns A value representing loading progress (from 0 to 100).
189
+ */
190
+ GetLoadingScreenProgress(): number;
81
191
 
82
- export interface vehicleBaseObject extends gameObject {
83
- HasGravity(): boolean;
84
- EnableGravity(enable: boolean): boolean;
85
- AddLinelyVelocity(velocity: Vector3, angularVelocity: Vector3): boolean;
86
- ChangeLinelyVelocity(
87
- velocity: Vector3,
88
- angularVelocity: Vector3,
89
- switchIndex: number,
90
- ): boolean;
91
- GetVelocity(): Vector3;
92
- GetAngularVelocity(): Vector3;
93
- GetPhysicsState(): number;
94
- IsOnGround(): boolean;
95
- GetBoundaryBox(): Box;
96
- VehicleOwnerWasChanged(): void;
97
- }
192
+ /**
193
+ * Callback fired or invoked when the loading screen switches states.
194
+ * @param newState - The new incoming loading screen state enum value.
195
+ */
196
+ OnLoadingScreenStateChange(newState: CyberEnums.ELoadingScreenState): void;
197
+ }
98
198
 
99
- export interface gameMappinSystem extends gamemappinsIMappinSystem {
100
- TrackMappin(id: gameNewMappinID): void;
101
- }
199
+ /**
200
+ * Core CyberMP Game Interface linking subsystem instances, runtime overrides, using game natives, engine callbacks, and engine utility tasks.
201
+ */
202
+ export interface MpGame {
203
+ /**
204
+ * The global interface instance for TweakDB manipulation.
205
+ */
206
+ TweakDB: TweakDB;
102
207
 
103
- type OnlyExtendingScriptableSystem<T> = {
104
- [K in keyof T as T[K] extends typeof gameScriptableSystem
105
- ? K
106
- : never]: T[K];
107
- };
208
+ /**
209
+ * Registers a callback listener tracking real-time keyboard or controller hardware input events.
210
+ * @param callback - Function invoked on keystrokes.
211
+ */
212
+ onInputKeyEvent(
213
+ callback: (
214
+ action: CyberEnums.EInputAction,
215
+ key: CyberEnums.EInputKey,
216
+ ) => void,
217
+ ): void;
108
218
 
109
- export interface gameScriptableSystemsContainer<
110
- Map = OnlyExtendingScriptableSystem<MpClasses>,
111
- > {
112
- Get<N extends keyof Map>(systemName: N): UnwrapClass<Map[N]>;
113
- }
219
+ /**
220
+ * Gets the rendering dimensions of the active screen display.
221
+ * @returns A tuple format containing `[width, height]` in pixels.
222
+ */
223
+ getDisplayResolution(): [width: number, height: number];
114
224
 
115
- export namespace ScriptGameInstance {
116
- export function GetLoadingScreenSystem(): LoadingScreenSystem;
117
- export function GetMultiplayerSystem(): MultiplayerSystem;
118
- }
225
+ /**
226
+ * Event hook that fires immediately when the underlying game session finishes initial loading structures.
227
+ * @param callback - Execution callback.
228
+ */
229
+ onGameLoaded(callback: () => void): void;
119
230
 
120
- export class LoadingScreenSystem {
121
- GetLoadingScreenState(): CyberEnums.ELoadingScreenState;
122
- GetLoadingScreenProgress(): number;
123
- OnLoadingScreenStateChange(newState: CyberEnums.ELoadingScreenState): void;
124
- }
231
+ /**
232
+ * Event hook that fires specifically when tweaks and TweakDB engine patches are loaded and safe to manipulate.
233
+ * @param callback - Execution callback.
234
+ */
235
+ onTweak(callback: () => void): void;
125
236
 
126
- export interface inkISystemRequestsHandler {
127
- StartMainMenu(): void;
128
- }
237
+ /**
238
+ * Event hook triggered during early initialization phase of the modding script runtime container.
239
+ * @param callback - Execution callback.
240
+ */
241
+ onInit(callback: () => void): void;
129
242
 
130
- export interface gameuiICharacterCustomizationSystem {
131
- SetPlayerGender(gender: CyberEnums.EPlayerGender, savedPos?: boolean): void;
132
- OnPlayerGenderChanged(gender: CyberEnums.EPlayerGender): void;
133
- }
243
+ /**
244
+ * Event hook that triggers immediately after the local user's player character object spawns in the world space.
245
+ * @param callback - Execution callback.
246
+ */
247
+ onLocalPlayerSpawned(callback: () => void): void;
134
248
 
135
- export interface entEntity {
136
- GetMorphWeights(): entMorphTargetWeightEntry[];
137
- ReassembleWithComponents(arr: entIComponent[]): void;
138
- TeleportPed(position: Vector3, rotation?: EulerAngles): void;
139
- }
249
+ /**
250
+ * Resolves and fetches an engine singleton class reference safely.
251
+ * @template T - The specific key class identifier inside `MpClasses`.
252
+ * @param name - The name identifier string of the singleton.
253
+ * @returns The active unwrapped instance object of that designated class.
254
+ */
255
+ getSingleton<T extends keyof MpClasses>(name: T): UnwrapClass<MpClasses[T]>;
140
256
 
141
- export interface MpClasses {
142
- LoadingScreenSystem: typeof LoadingScreenSystem;
143
- entEntity: typeof entEntity;
144
- }
257
+ /**
258
+ * Directly injects or appends an item template into the player's primary inventory framework.
259
+ * @param itemName - The specific TweakDB string ID of the item.
260
+ * @param count - Total item quantity stack to add.
261
+ */
262
+ AddToInventory(itemName: string, count: number): void;
145
263
 
146
- export interface MpGame {
147
- TweakDB: TweakDB;
264
+ /**
265
+ * Converts a plaintext string model or path identifier name directly into a stable 64-bit unsigned hash representation.
266
+ * @param name - Raw item asset or TweakDB blueprint name path string.
267
+ * @param type - Parsing method mode targeting either a TweakDB path reference (`tweakdbid`) or an internal engine CName string hash (`cname`).
268
+ * @returns The calculated hash string value.
269
+ */
270
+ getHashFromName(name: string, type: 'tweakdbid' | 'cname'): string;
148
271
 
149
- onInputKeyEvent(
150
- callback: (
151
- action: CyberEnums.EInputAction,
152
- key: CyberEnums.EInputKey,
153
- ) => void,
154
- ): void;
272
+ /**
273
+ * Fully replaces a targeted class method with custom script logic.
274
+ * @see {@link OverrideFunction}
275
+ */
276
+ override: OverrideFunction;
155
277
 
156
- getDisplayResolution(): [width: number, height: number];
278
+ /**
279
+ * Hooks an observation callback that runs immediately **after** the target native class method executes.
280
+ * @see {@link ObserveFunction}
281
+ */
282
+ observeAfter: ObserveFunction;
157
283
 
158
- /**
159
- * Event when the game is started.
160
- */
161
- onGameLoaded(callback: () => void): void;
284
+ /**
285
+ * Hooks an observation callback that runs immediately **before** the target native class method executes.
286
+ * @see {@link ObserveFunction}
287
+ */
288
+ observeBefore: ObserveFunction;
162
289
 
163
- /**
164
- * Event when tweaks is loaded.
165
- */
166
- onTweak(callback: () => void): void;
290
+ /**
291
+ * Standard alias hook pointing to {@link observeBefore}. Evaluates logic prior to core target execution.
292
+ * @see {@link ObserveFunction}
293
+ */
294
+ observe: ObserveFunction;
167
295
 
168
- /**
169
- * Event when tweaks is loaded.
170
- */
171
- onInit(callback: () => void): void;
296
+ /**
297
+ * Observes a method inside a selected class after execution. Can only invoke methods native to {@link MpGame}.
298
+ * Should be used when it is crucial for performance that the function executes as fast as V8 allows.
299
+ * @see {@link ObserveFunction}
300
+ */
301
+ observeAfterRaw: ObserveFunction;
172
302
 
173
- /**
174
- * Event when local player has been spawned.
175
- */
176
- onLocalPlayerSpawned(callback: () => void): void;
303
+ /**
304
+ * Observes a method inside a selected class before execution. Can only invoke methods native to {@link MpGame}.
305
+ * Should be used when it is crucial for performance that the function executes as fast as V8 allows.
306
+ * @see {@link ObserveFunction}
307
+ */
308
+ observeBeforeRaw: ObserveFunction;
177
309
 
178
- /**
179
- * Get singleton.
180
- */
181
- getSingleton<T extends keyof MpClasses>(name: T): UnwrapClass<MpClasses[T]>;
310
+ /**
311
+ * Standard alias hook pointing to {@link observeBeforeRaw}. Evaluates high-performance raw logic prior to execution.
312
+ * @see {@link ObserveFunction}
313
+ */
314
+ observeRaw: ObserveFunction;
182
315
 
183
- /**
184
- * Add something to inventory.
185
- */
186
- AddToInventory(itemName: string, count: number): void;
316
+ /**
317
+ * Serializes a JavaScript runtime payload object structural value into a native engine container format (`Variant`).
318
+ * @template R - The expected return typing output blueprint shape.
319
+ * @param obj - Target entity object structure to convert.
320
+ * @param str - Native structural reflection mapping blueprint name string.
321
+ * @returns The wrapped engine reference asset layout structure.
322
+ */
323
+ toVariant<R = Record<string, unknown>>(obj: any, str: string): R;
187
324
 
188
- /**
189
- * Returns model hash convertable to number.
190
- * @param name Model name
191
- * @param type Model name type
192
- * @returns Model hash
193
- */
194
- getHashFromName(name: string, type: 'tweakdbid' | 'cname'): string;
325
+ /**
326
+ * Deserializes a native engine container structure layout (`Variant`) back into raw accessible JavaScript object values.
327
+ * @template R - The expected target JavaScript shape format.
328
+ * @param obj - Variant payload container input from the game engine.
329
+ * @returns The unwrapped JavaScript object structure data.
330
+ */
331
+ fromVariant<R = any>(obj: any): R;
332
+ }
195
333
 
196
- /**
197
- * Overrides method function inside selected class.
198
- * @param className Class name
199
- * @param methodName Method name inside of class
200
- * @param {selfFunction} func Function to override instead
201
- */
202
- override: OverrideFunction;
334
+ /**
335
+ * Extended by CyberMP `inkISystemRequestsHandler` class
336
+ * @category Natives
337
+ */
338
+ export interface extended__inkISystemRequestsHandler {
339
+ /**
340
+ * Forces the UI context architecture to navigate back out into the main landing splash screen.
341
+ */
342
+ StartMainMenu(): void;
343
+ }
203
344
 
204
- /**
205
- * Observes method inside selected class.
206
- * @param className Class name
207
- * @param methodName Method name inside of class
208
- * @param {selfFunction} callback Callback of method function.
209
- */
210
- observeAfter: ObserveFunction;
345
+ /**
346
+ * Extended by CyberMP `entEntity` class
347
+ * @category Natives
348
+ */
349
+ interface extended__entEntity {
350
+ /**
351
+ * Obtains lists specifying explicit weight indexes controlling facial custom blendshapes or structural targets.
352
+ * @returns Array listing mesh blend weights structures.
353
+ */
354
+ GetMorphWeights(): entMorphTargetWeightEntry[];
211
355
 
212
- /**
213
- * Observes method inside selected class.
214
- * @param className Class name
215
- * @param methodName Method name inside of class
216
- * @param {selfFunction} callback Callback of method function.
217
- */
218
- observeBefore: ObserveFunction;
356
+ /**
357
+ * Forces the entity container model frame structural layers to assemble and update via selected visual components arrays.
358
+ * @param arr - List containing components structures to attach.
359
+ */
360
+ ReassembleWithComponents(arr: entIComponent[]): void;
219
361
 
220
- /**
221
- * Alias for {@link observeBefore}.
222
- * @param className Class name
223
- * @param methodName Method name inside of class
224
- * @param {selfFunction} callback Callback of method function.
225
- */
226
- observe: ObserveFunction;
362
+ /**
363
+ * Teleports a physical game object / Pedestrian directly to specific vector coordinates.
364
+ * @param position - Target 3D destination coordinate vector.
365
+ * @param rotation - Optional Euler orientation layout coordinates (Pitch, Roll, Yaw).
366
+ */
367
+ TeleportPed(position: Vector3, rotation?: EulerAngles): void;
368
+ }
227
369
 
228
- /**
229
- * Observes method inside selected class. Can only call methods from {@link MpGame}.
230
- * Should be used when it's important for the function to execute quickly (as fast as V8 allows).
231
- * @param className Class name
232
- * @param methodName Method name inside of class
233
- * @param {selfFunction} callback Callback of method function.
234
- */
235
- observeAfterRaw: ObserveFunction;
370
+ /**
371
+ * Extended by CyberMP `gameuiICharacterCustomizationSystem` class
372
+ * @category Natives
373
+ */
374
+ interface extended__gameuiICharacterCustomizationSystem {
375
+ /**
376
+ * Updates player's gender state representation variables directly inside system profiles.
377
+ * @param gender - Target gender enum identifier asset option.
378
+ * @param savedPos - Optional parameter to persist or retain vector frame state context layout positions.
379
+ */
380
+ SetPlayerGender(gender: CyberEnums.EPlayerGender, savedPos?: boolean): void;
236
381
 
237
- /**
238
- * Observes method inside selected class. Can only call methods from {@link MpGame}.
239
- * Should be used when it's important for the function to execute quickly (as fast as V8 allows).
240
- * @param className Class name
241
- * @param methodName Method name inside of class
242
- * @param {selfFunction} callback Callback of method function.
243
- */
244
- observeBeforeRaw: ObserveFunction;
382
+ /**
383
+ * Callback fired immediately following successful adjustments to player character gender states.
384
+ * @param gender - The incoming target modified gender enumeration value.
385
+ */
386
+ OnPlayerGenderChanged(gender: CyberEnums.EPlayerGender): void;
387
+ }
388
+
389
+ /**
390
+ * Extended by CyberMP `worldWeatherScriptInterface` class
391
+ * @category Natives
392
+ */
393
+ interface extended__worldWeatherScriptInterface {
394
+ /**
395
+ * Commands the environment engine manager to override active weather profiles.
396
+ * @param weather - The weather enum state or specific profile asset name path string.
397
+ * @param blendTime - Optional transition timeline sequence parameter in seconds.
398
+ * @param priority - Optional overlay layer sorting stack index weight level identifier.
399
+ * @returns `true` if weather override commands executed, otherwise `false`.
400
+ */
401
+ SetWeather(
402
+ weather: CyberEnums.EWeatherState,
403
+ blendTime?: number,
404
+ priority?: number,
405
+ ): boolean;
406
+
407
+ /**
408
+ * Clears ongoing script-driven environmental alterations and returns to automated weather loops.
409
+ * @param forceRestore - Optional flag bypass to drop timelines and clear immediately.
410
+ * @param blendTime - Optional transition timeline layout duration in seconds.
411
+ * @returns `true` if successfully reset, otherwise `false`.
412
+ */
413
+ ResetWeather(forceRestore?: boolean, blendTime?: number): boolean;
414
+ }
415
+
416
+ /**
417
+ * Extended by CyberMP `vehicleBaseObject` class
418
+ * @category Natives
419
+ */
420
+ interface extended__vehicleBaseObject {
421
+ /**
422
+ * Confirms whether gravity properties are currently influencing the physical vehicle entity.
423
+ * @returns `true` if gravity calculations are active, otherwise `false`.
424
+ */
425
+ HasGravity(): boolean;
426
+
427
+ /**
428
+ * Enables or disables physics engine gravity forces on this vehicle.
429
+ * @param enable - `true` to apply normal downforce gravity, `false` to disable.
430
+ * @returns `true` if state adjusted successfully.
431
+ */
432
+ EnableGravity(enable: boolean): boolean;
433
+
434
+ /**
435
+ * Imparts instantaneous raw linear velocity vector impulses into the structural entity coordinates frame.
436
+ * @param velocity - Linear velocity vector forces factor.
437
+ * @param angularVelocity - Angular momentum spinning forces vector.
438
+ * @returns `true` if impulse registers onto object layers.
439
+ */
440
+ AddLinelyVelocity(velocity: Vector3, angularVelocity: Vector3): boolean;
441
+
442
+ /**
443
+ * Explicitly sets or resets the exact speed vectors tracking ongoing object momentum.
444
+ * @param velocity - Target directional speed vector values coordinates.
445
+ * @param angularVelocity - Target rotational angular values coordinates.
446
+ * @param switchIndex - Index configuration selection identifier flag.
447
+ * @returns `true` if velocity state fields successfully updated.
448
+ */
449
+ ChangeLinelyVelocity(
450
+ velocity: Vector3,
451
+ angularVelocity: Vector3,
452
+ switchIndex: number,
453
+ ): boolean;
245
454
 
455
+ /**
456
+ * Retrieves the ongoing linear velocity vectors representing forward/lateral speed momentum.
457
+ * @returns Directional speed coordinate matrix vector tracking values.
458
+ */
459
+ GetVelocity(): Vector3;
460
+
461
+ /**
462
+ * Retrieves the current rotation speed vector parameters tracking operational values.
463
+ * @returns Rotational velocity tracking data vector.
464
+ */
465
+ GetAngularVelocity(): Vector3;
466
+
467
+ /**
468
+ * Retrieves the physics engine simulation state mask flags from the object tracking loop.
469
+ * @returns Numeric evaluation bitmask tracking active states.
470
+ */
471
+ GetPhysicsState(): number;
472
+
473
+ /**
474
+ * Checks whether the vehicle tires or frame base are actively making physical contact with terrain/surfaces.
475
+ * @returns `true` if supported on terrain boundaries, otherwise `false`.
476
+ */
477
+ IsOnGround(): boolean;
478
+
479
+ /**
480
+ * Retrieves structural bounding box spatial calculation variables for collision tracking.
481
+ * @returns Object bounding structural frame dimensional properties limits.
482
+ */
483
+ GetBoundaryBox(): Box;
484
+
485
+ /**
486
+ * Callback fired or called manually when the driving authority or network owner ID of this vehicle shifts.
487
+ */
488
+ VehicleOwnerWasChanged(): void;
489
+ }
490
+
491
+ /**
492
+ * Extended by CyberMP `gameMappinSystem` class
493
+ * @category Natives
494
+ */
495
+ interface extended__gameMappinSystem {
496
+ /**
497
+ * Pins or tracks a UI map indicator landmark tracking profile target pathing point.
498
+ * @param id - Unique mapping ID parameter identifier structure.
499
+ */
500
+ TrackMappin(id: gameNewMappinID): void;
501
+ }
502
+
503
+ import '../out/game';
504
+
505
+ declare module '../out/game' {
506
+ interface worldWeatherScriptInterface {
507
+ SetWeather(
508
+ weather: CyberEnums.EWeatherState,
509
+ blendTime?: number,
510
+ priority?: number,
511
+ ): boolean;
512
+ ResetWeather(forceRestore?: boolean, blendTime?: number): boolean;
513
+ }
514
+
515
+ interface vehicleBaseObject extends extended__vehicleBaseObject {}
516
+
517
+ interface gameMappinSystem extends extended__gameMappinSystem {}
518
+
519
+ /**
520
+ * Filter type mapped strictly to extract fields inheriting properties originating from `gameScriptableSystem`.
521
+ * @template T - The baseline target typing mapping block index to scan.
522
+ */
523
+ type OnlyExtendingScriptableSystem<T> = {
524
+ [K in keyof T as T[K] extends typeof gameScriptableSystem
525
+ ? K
526
+ : never]: T[K];
527
+ };
528
+
529
+ interface gameScriptableSystemsContainer<
530
+ Map = OnlyExtendingScriptableSystem<MpClasses>,
531
+ > {
246
532
  /**
247
- * Alias for {@link observeBeforeRaw}.
248
- * @param className Class name
249
- * @param methodName Method name inside of class
250
- * @param {selfFunction} callback Callback of method function.
533
+ * Resolves an isolated structural execution system script framework block instance module by name.
534
+ * @template N - Key matching target extensions inside active scripting layouts.
535
+ * @param systemName - The exact structural name of the requested scriptable system.
536
+ * @returns The active unwrapped instance structure mapping implementation.
251
537
  */
252
- observeRaw: ObserveFunction;
538
+ Get<N extends keyof Map>(systemName: N): UnwrapClass<Map[N]>;
539
+ }
253
540
 
254
- toVariant<R = Record<string, unknown>>(obj: any, str: string): R;
255
- fromVariant<R = any>(obj: any): R;
541
+ namespace ScriptGameInstance {
542
+ export function GetLoadingScreenSystem(): LoadingScreenSystem;
543
+ export function GetMultiplayerSystem(): MultiplayerSystem;
544
+ }
545
+
546
+ interface inkISystemRequestsHandler
547
+ extends extended__inkISystemRequestsHandler {}
548
+
549
+ interface gameuiICharacterCustomizationSystem
550
+ extends extended__gameuiICharacterCustomizationSystem {}
551
+
552
+ interface entEntity extends extended__entEntity {}
553
+
554
+ interface MpClasses {
555
+ LoadingScreenSystem: typeof LoadingScreenSystem;
556
+ MultiplayerSystem: typeof MultiplayerSystem;
256
557
  }
257
558
  }