@cybermp/client-types 2.2.1 → 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 +56 -0
- package/out/bitfields.ts +47 -47
- package/out/enums.ts +13899 -13899
- package/out/game.d.ts +1 -4
- package/package.json +15 -6
- package/precomputed/cef.d.ts +24 -5
- package/precomputed/commands.d.ts +17 -0
- package/precomputed/discord.d.ts +20 -3
- package/precomputed/enums.ts +47 -38
- package/precomputed/events.d.ts +224 -63
- package/precomputed/game.d.ts +601 -257
- package/precomputed/local-storage.d.ts +37 -9
- package/precomputed/local.d.ts +106 -0
- package/precomputed/meta.d.ts +78 -18
- package/precomputed/mp.d.ts +106 -137
- package/precomputed/network.d.ts +81 -0
- package/precomputed/voice-chat.d.ts +86 -23
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Interface providing access to persistent client-side key-value storage.
|
|
3
|
+
* Data saved here remains available across different game sessions and server reconnections.
|
|
4
|
+
*/
|
|
5
|
+
export interface MpLocalStorage {
|
|
6
|
+
/**
|
|
7
|
+
* Associates a string value with a specific key in the storage database.
|
|
8
|
+
* If the key already exists, its value will be overwritten.
|
|
9
|
+
* @param key - The unique identifier name for the storage entry.
|
|
10
|
+
* @param value - The plaintext string data payload to be stored.
|
|
11
|
+
*/
|
|
12
|
+
set(key: string, value: string): void;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves the stored string value associated with the specified key.
|
|
16
|
+
* @param key - The unique identifier name of the entry to fetch.
|
|
17
|
+
* @returns The stored string value, or an empty string/null if the key does not exist.
|
|
18
|
+
*/
|
|
19
|
+
get(key: string): string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Permanently removes a specific key-value entry from the storage map.
|
|
23
|
+
* @param key - The unique identifier name of the entry to delete.
|
|
24
|
+
*/
|
|
25
|
+
delete(key: string): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Clears all keys and values currently held in this resource's local storage instance.
|
|
29
|
+
*/
|
|
30
|
+
deleteAll(): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Explicitly flushes the current state of the in-memory storage data down to the physical disk.
|
|
34
|
+
* Use this to ensure volatile data isn't lost if the game client unexpectedly crashes.
|
|
35
|
+
*/
|
|
36
|
+
save(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages local player lifecycle operations and the creation of client-side entities.
|
|
3
|
+
*/
|
|
4
|
+
export interface MpLocal {
|
|
5
|
+
/**
|
|
6
|
+
* Spawns local player
|
|
7
|
+
* @param x - Horizontal grid position coordinate value.
|
|
8
|
+
* @param y - Vertical grid position coordinate value.
|
|
9
|
+
* @param z - Height grid elevation coordinate value.
|
|
10
|
+
* @param yaw - The horizontal rotation layout angle in degrees.
|
|
11
|
+
* @returns `true` if the spawn lifecycle sequence initiated successfully, otherwise `false`.
|
|
12
|
+
*/
|
|
13
|
+
spawnPlayer(x: number, y: number, z: number, yaw: number): boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Instantiates a localized ped entity.
|
|
17
|
+
* This entity remains completely un-synchronized and invisible to other remote clients.
|
|
18
|
+
* @param skinHash - Asset model signature key hash.
|
|
19
|
+
* @param appHash - Visual appearance setup key components variation hash.
|
|
20
|
+
* @param x - Horizontal coordinate space.
|
|
21
|
+
* @param y - Vertical coordinate space.
|
|
22
|
+
* @param z - Elevation height space coordinate.
|
|
23
|
+
* @param yaw - Rotational alignment facing angle.
|
|
24
|
+
* @param streaming - Controls if engine virtualization automatically handles streaming boundaries tracking.
|
|
25
|
+
* @returns The resulting unique local game entity handle ID.
|
|
26
|
+
*/
|
|
27
|
+
spawnPed(
|
|
28
|
+
skinHash: number | bigint,
|
|
29
|
+
appHash: number | bigint,
|
|
30
|
+
x: number,
|
|
31
|
+
y: number,
|
|
32
|
+
z: number,
|
|
33
|
+
yaw: number,
|
|
34
|
+
streaming: boolean,
|
|
35
|
+
): number;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Instantiates a localized vehicle entity inside the engine environment.
|
|
39
|
+
* This entity remains completely un-synchronized and invisible to other remote clients.
|
|
40
|
+
* @param skinHash - Asset model signature key hash.
|
|
41
|
+
* @param appHash - Visual appearance setup key components variation hash.
|
|
42
|
+
* @param x - Horizontal coordinate space.
|
|
43
|
+
* @param y - Vertical coordinate space.
|
|
44
|
+
* @param z - Elevation height space coordinate.
|
|
45
|
+
* @param roll - Longitudinal rotation axis orientation angle.
|
|
46
|
+
* @param pitch - Lateral rotation axis orientation angle.
|
|
47
|
+
* @param yaw - Directional heading alignment angle.
|
|
48
|
+
* @param streaming - Controls if engine virtualization automatically handles streaming boundaries tracking.
|
|
49
|
+
* @returns The resulting unique local game entity handle ID.
|
|
50
|
+
*/
|
|
51
|
+
spawnVehicle(
|
|
52
|
+
skinHash: number | bigint,
|
|
53
|
+
appHash: number | bigint,
|
|
54
|
+
x: number,
|
|
55
|
+
y: number,
|
|
56
|
+
z: number,
|
|
57
|
+
roll: number,
|
|
58
|
+
pitch: number,
|
|
59
|
+
yaw: number,
|
|
60
|
+
streaming: boolean,
|
|
61
|
+
): number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Instantiates a localized world object or dynamic prop entity inside the engine environment.
|
|
65
|
+
* This entity remains completely un-synchronized and invisible to other remote clients.
|
|
66
|
+
* @param skinHash - Asset model signature key hash.
|
|
67
|
+
* @param appHash - Visual appearance setup key components variation hash.
|
|
68
|
+
* @param x - Horizontal coordinate space.
|
|
69
|
+
* @param y - Vertical coordinate space.
|
|
70
|
+
* @param z - Elevation height space coordinate.
|
|
71
|
+
* @param roll - Longitudinal rotation axis orientation angle.
|
|
72
|
+
* @param pitch - Lateral rotation axis orientation angle.
|
|
73
|
+
* @param yaw - Directional heading alignment angle.
|
|
74
|
+
* @param streaming - Controls if engine virtualization automatically handles streaming boundaries tracking.
|
|
75
|
+
* @returns The resulting unique local game entity handle ID.
|
|
76
|
+
*/
|
|
77
|
+
spawnObject(
|
|
78
|
+
skinHash: bigint | number,
|
|
79
|
+
appHash: bigint | number,
|
|
80
|
+
x: number,
|
|
81
|
+
y: number,
|
|
82
|
+
z: number,
|
|
83
|
+
roll: number,
|
|
84
|
+
pitch: number,
|
|
85
|
+
yaw: number,
|
|
86
|
+
streaming: boolean,
|
|
87
|
+
): number;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Forces immediate engine de-allocation and cleanup deletion maps targeting an isolated local pedestrian.
|
|
91
|
+
* @param hash - Unique local game engine entity instance handle to clear.
|
|
92
|
+
*/
|
|
93
|
+
despawnPed(hash: number): void;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Forces immediate engine de-allocation and cleanup deletion maps targeting an isolated local vehicle.
|
|
97
|
+
* @param hash - Unique local game engine entity instance handle to clear.
|
|
98
|
+
*/
|
|
99
|
+
despawnVehicle(hash: number): void;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Forces immediate engine de-allocation and cleanup deletion maps targeting an isolated local object.
|
|
103
|
+
* @param hash - Unique local game engine entity instance handle to clear.
|
|
104
|
+
*/
|
|
105
|
+
despawnObject(hash: number): void;
|
|
106
|
+
}
|
package/precomputed/meta.d.ts
CHANGED
|
@@ -1,18 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Interface managing cross-resource and synchronized state metadata across the network layer.
|
|
3
|
+
* Allows attaching arbitrary data structures to globals, specific players, the local player, or synchronized network entities.
|
|
4
|
+
*/
|
|
5
|
+
export interface MpMeta {
|
|
6
|
+
/**
|
|
7
|
+
* Sets a global metadata value accessible across the entire runtime environment.
|
|
8
|
+
* @param key - The unique identifier string for the metadata entry.
|
|
9
|
+
* @param value - The data payload to store (can be any serializable object or primitive).
|
|
10
|
+
* @param sync - Optional flag. If `true`, synchronizes this metadata across the network to all other clients.
|
|
11
|
+
*/
|
|
12
|
+
setGlobalMeta(key: string, value: any, sync?: boolean): void;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves a global metadata value by its key.
|
|
16
|
+
* @template T - The expected type of the returned metadata value.
|
|
17
|
+
* @param key - The unique identifier string of the metadata entry to look up.
|
|
18
|
+
* @returns The stored global metadata value cast to type T, or undefined if it does not exist.
|
|
19
|
+
*/
|
|
20
|
+
getGlobalMeta<T = any>(key: string): T;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Assigns a metadata value to a specific remote player using their unique player network ID.
|
|
24
|
+
* @param playerId - The network identification integer of the target player.
|
|
25
|
+
* @param key - The unique identifier string for this player's metadata entry.
|
|
26
|
+
* @param value - The data payload to attach to the player.
|
|
27
|
+
* @param sync - Optional flag. If `true`, syncs this change to all other connected clients over the network.
|
|
28
|
+
*/
|
|
29
|
+
setPlayerMeta(
|
|
30
|
+
playerId: number,
|
|
31
|
+
key: string,
|
|
32
|
+
value: any,
|
|
33
|
+
sync?: boolean,
|
|
34
|
+
): void;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a metadata value attached to a specific remote player.
|
|
38
|
+
* @template T - The expected type of the returned metadata value.
|
|
39
|
+
* @param playerId - The network identification integer of the target player.
|
|
40
|
+
* @param key - The unique identifier string of the player's metadata entry.
|
|
41
|
+
* @returns The stored metadata value cast to type T, or undefined if it does not exist.
|
|
42
|
+
*/
|
|
43
|
+
getPlayerMeta<T = any>(playerId: number, key: string): T;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Sets a metadata value restricted or assigned specifically to the local player instance.
|
|
47
|
+
* @param key - The unique identifier string for the local player's metadata entry.
|
|
48
|
+
* @param value - The data payload to store.
|
|
49
|
+
* @param sync - Optional flag. If `true`, relays this local metadata state out to the server and other clients.
|
|
50
|
+
*/
|
|
51
|
+
setLocalPlayerMeta(key: string, value: any, sync?: boolean): void;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves a metadata value attached specifically to the local player instance.
|
|
55
|
+
* @template T - The expected type of the returned metadata value.
|
|
56
|
+
* @param key - The unique identifier string of the local player's metadata entry.
|
|
57
|
+
* @returns The stored metadata value cast to type T, or undefined if it does not exist.
|
|
58
|
+
*/
|
|
59
|
+
getLocalPlayerMeta<T = any>(key: string): T;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Attaches a metadata state payload to any synchronized network entity (e.g., vehicles, props, peds) using its network ID.
|
|
63
|
+
* @param netId - The network-assigned unique identifier tracking the target entity.
|
|
64
|
+
* @param key - The unique identifier string for the entity's metadata entry.
|
|
65
|
+
* @param value - The data payload to attach to the entity.
|
|
66
|
+
* @param sync - Optional flag. If `true`, synchronizes this entity metadata property to all clients tracking this object.
|
|
67
|
+
*/
|
|
68
|
+
setEntityMeta(netId: number, key: string, value: any, sync?: boolean): void;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves a metadata value associated with a synchronized network entity.
|
|
72
|
+
* @template T - The expected type of the returned metadata value.
|
|
73
|
+
* @param netId - The network-assigned unique identifier tracking the target entity.
|
|
74
|
+
* @param key - The unique identifier string of the entity's metadata entry.
|
|
75
|
+
* @returns The stored metadata value cast to type T, or undefined if it does not exist.
|
|
76
|
+
*/
|
|
77
|
+
getEntityMeta<T = any>(netId: number, key: string): T;
|
|
78
|
+
}
|
package/precomputed/mp.d.ts
CHANGED
|
@@ -1,137 +1,106 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MpCef } from './cef';
|
|
3
|
-
import type { MpDiscord } from './discord';
|
|
4
|
-
import type { MpEvents } from './events';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*/
|
|
108
|
-
getCurrentServerEndpoint(): string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Get server ID from player hash.
|
|
112
|
-
*/
|
|
113
|
-
getPlayerServerId(playerHash: number): number;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Get src variable value as string.
|
|
117
|
-
*/
|
|
118
|
-
getVar(varName: string): string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Get console variable value as integer.
|
|
122
|
-
*/
|
|
123
|
-
getVarInt(varName: string): number;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Returns time in ms since game start.
|
|
127
|
-
*/
|
|
128
|
-
getGameTimer(): number;
|
|
129
|
-
|
|
130
|
-
getLauncherSettingsJSON(): string;
|
|
131
|
-
|
|
132
|
-
getLauncherSettings(): any;
|
|
133
|
-
|
|
134
|
-
setTick(cb: () => any): number;
|
|
135
|
-
|
|
136
|
-
clearTick(tickId: number): void;
|
|
137
|
-
}
|
|
1
|
+
import type { MpClasses, MpGlobals } from '../out/game';
|
|
2
|
+
import type { MpCef } from './cef';
|
|
3
|
+
import type { MpDiscord } from './discord';
|
|
4
|
+
import type { MpEvents } from './events';
|
|
5
|
+
import type { MpGame } from './game';
|
|
6
|
+
import type { MpLocal } from './local';
|
|
7
|
+
import type { MpLocalStorage } from './local-storage';
|
|
8
|
+
import type { MpMeta } from './meta';
|
|
9
|
+
import type { MpNetwork } from './network';
|
|
10
|
+
import type { MpVoiceChat } from './voice-chat';
|
|
11
|
+
|
|
12
|
+
type ServerVector3 = [number, number, number];
|
|
13
|
+
type ServerVector4 = [number, number, number, number];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The main client-side manager interface for CyberMP.
|
|
17
|
+
* Aggregates all core subsystems, network synchronization mappers, local entity spawning arrays, and game-level APIs.
|
|
18
|
+
*/
|
|
19
|
+
export interface MpClient {
|
|
20
|
+
/**
|
|
21
|
+
* Access interface for native game engines, classes, and global engine parameters.
|
|
22
|
+
*/
|
|
23
|
+
game: MpGame & MpGlobals & MpClasses;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The client event communication system bridge.
|
|
27
|
+
*/
|
|
28
|
+
events: MpEvents;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Metadata state synchronization manager across entities and network profiles.
|
|
32
|
+
*/
|
|
33
|
+
meta: MpMeta;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Integrated structural client voice communication management interface.
|
|
37
|
+
*/
|
|
38
|
+
voiceChat: MpVoiceChat;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Controls and interfaces with the embedded Chromium Embedded Framework web views.
|
|
42
|
+
*/
|
|
43
|
+
cef: MpCef;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Provides access to Discord rich presence and authentications integration layers.
|
|
47
|
+
*/
|
|
48
|
+
discord: MpDiscord;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Provides networking and entity synchronization utilities
|
|
52
|
+
*/
|
|
53
|
+
network: MpNetwork;
|
|
54
|
+
|
|
55
|
+
local: MpLocal;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Provides access to local key-value data storage states spanning resource restarts.
|
|
59
|
+
*/
|
|
60
|
+
localStorage: MpLocalStorage;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Queries environment configuration arrays to fetch string system variable values defined inside config manifest structures.
|
|
64
|
+
* @param varName - Target environmental variable path identifier name key string.
|
|
65
|
+
* @returns The corresponding variable value matching that name string.
|
|
66
|
+
*/
|
|
67
|
+
getVar(varName: string): string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Queries environment configuration arrays to fetch integer variable values defined inside config manifest structures.
|
|
71
|
+
* @param varName - Target environmental variable path identifier name key string.
|
|
72
|
+
* @returns The variable evaluation value parsed into a numerical integer.
|
|
73
|
+
*/
|
|
74
|
+
getVarInt(varName: string): number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves total execution duration elapsed since initialization of the master game engine shell layer tracking loops.
|
|
78
|
+
* @returns Calculated time tracker measurement value in milliseconds.
|
|
79
|
+
*/
|
|
80
|
+
getGameTimer(): number;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Fetches raw unparsed configurations mapping platform launcher operational states.
|
|
84
|
+
* @returns Unparsed JSON payload string representing client settings configurations.
|
|
85
|
+
*/
|
|
86
|
+
getLauncherSettingsJSON(): string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Fetches parsed layout profiles tracking core client options configurations.
|
|
90
|
+
* @returns Object tracking client properties choices.
|
|
91
|
+
*/
|
|
92
|
+
getLauncherSettings(): any;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Registers a callback execution function that runs continuously on every game engine render frame.
|
|
96
|
+
* @param cb - The logic routine executed on every render cycle.
|
|
97
|
+
* @returns An execution identifier handle index required to disable the execution loop later.
|
|
98
|
+
*/
|
|
99
|
+
setTick(cb: () => any): number;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Removes and unbinds an active rendering cycle tracking loop execution block.
|
|
103
|
+
* @param tickId - The original registration index key returned by {@link setTick}.
|
|
104
|
+
*/
|
|
105
|
+
clearTick(tickId: number): void;
|
|
106
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides networking and entity synchronization utilities
|
|
3
|
+
*/
|
|
4
|
+
export interface MpNetwork {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the endpoint address configuration tracking string of the current server session.
|
|
7
|
+
* @returns Endpoint routing connection destination details string (e.g., `"127.0.0.1:4430"`).
|
|
8
|
+
*/
|
|
9
|
+
getServerAddress(): string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Returns an array of game engine handling entities currently within the local player's streaming radius.
|
|
13
|
+
* @param objName - The engine pool target class filter type to look up.
|
|
14
|
+
* @returns An array containing the local runtime engine IDs matching the target pool.
|
|
15
|
+
*/
|
|
16
|
+
getStreamedPool(
|
|
17
|
+
objName: 'CVehicle' | 'CPed' | 'CPickup' | 'CObject',
|
|
18
|
+
): number[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Gets an array containing all active remote network players currently streaming inside the local user's zone.
|
|
22
|
+
* @returns An array of native game engine entity IDs.
|
|
23
|
+
*/
|
|
24
|
+
getStreamedPlayers(): number[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Resolves a network sync ID into its corresponding local native game engine entity reference handle for a vehicle.
|
|
28
|
+
* @param networkId - The unique synchronization network ID assigned by the server host.
|
|
29
|
+
* @returns The corresponding local native game engine vehicle handle ID.
|
|
30
|
+
*/
|
|
31
|
+
getVehicleGameId(networkId: number): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Translates a native vehicle game handle into its global shared replication network sync ID.
|
|
35
|
+
* @param gameId - The local native game engine entity instance handle.
|
|
36
|
+
* @returns The synchronized network ID assigned to that vehicle.
|
|
37
|
+
*/
|
|
38
|
+
getVehicleId(gameId: number): number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Translates a native pedestrian/NPC handle into its global shared replication network sync ID.
|
|
42
|
+
* @param gameId - The local native game engine entity instance handle.
|
|
43
|
+
* @returns The synchronized network ID assigned to that pedestrian.
|
|
44
|
+
*/
|
|
45
|
+
getPedId(gameId: number): number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Resolves a network sync ID into its corresponding local native game engine entity reference handle for a pedestrian.
|
|
49
|
+
* @param networkId - The unique synchronization network ID assigned by the server host.
|
|
50
|
+
* @returns The corresponding local native game engine pedestrian handle ID.
|
|
51
|
+
*/
|
|
52
|
+
getPedGameId(networkId: number): number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Resolves a network sync ID into its corresponding local native game engine entity reference handle for a static object.
|
|
56
|
+
* @param networkId - The unique synchronization network ID assigned by the server host.
|
|
57
|
+
* @returns The corresponding local native game engine object handle ID.
|
|
58
|
+
*/
|
|
59
|
+
getObjectGameId(networkId: number): number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Translates a native object or entity prop handle into its global shared replication network sync ID.
|
|
63
|
+
* @param gameId - The local native game engine entity instance handle.
|
|
64
|
+
* @returns The synchronized network ID assigned to that object.
|
|
65
|
+
*/
|
|
66
|
+
getObjectId(gameId: number): number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Resolves a network sync ID into its corresponding local native game engine entity reference handle for a player.
|
|
70
|
+
* @param networkId - The unique synchronization network ID assigned by the server host.
|
|
71
|
+
* @returns The corresponding local native game engine player handle ID.
|
|
72
|
+
*/
|
|
73
|
+
getPlayerGameId(networkId: number): number;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Translates a native player character entity handle into its global shared replication network sync ID.
|
|
77
|
+
* @param gameId - The local native game engine entity instance handle.
|
|
78
|
+
* @returns The synchronized network ID assigned to that player.
|
|
79
|
+
*/
|
|
80
|
+
getPlayerId(gameId: number): number;
|
|
81
|
+
}
|