@nativewrappers/fivem 0.0.18 → 0.0.19
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.
|
@@ -10,7 +10,7 @@ export declare class Vehicle extends BaseEntity {
|
|
|
10
10
|
static getClassDisplayName(vehicleClass: VehicleClass): string;
|
|
11
11
|
static exists(vehicle: Vehicle): boolean;
|
|
12
12
|
static fromHandle(handle: number): Vehicle | null;
|
|
13
|
-
static fromNetworkId(networkId: number
|
|
13
|
+
static fromNetworkId(networkId: number): Vehicle | null;
|
|
14
14
|
private _doors;
|
|
15
15
|
private _mods;
|
|
16
16
|
private _wheels;
|
|
@@ -64,11 +64,7 @@ export declare class Vehicle extends BaseEntity {
|
|
|
64
64
|
get IsSirenActive(): boolean;
|
|
65
65
|
set IsSirenActive(value: boolean);
|
|
66
66
|
set HasMutedSirens(value: boolean);
|
|
67
|
-
|
|
68
|
-
* @deprecated use {@HasMutedSirens} instead.
|
|
69
|
-
*/
|
|
70
|
-
set IsSirenSilent(value: boolean);
|
|
71
|
-
soundHorn(duration: number): void;
|
|
67
|
+
soundHorn(duration: number, mode?: number): void;
|
|
72
68
|
get IsWanted(): boolean;
|
|
73
69
|
set IsWanted(value: boolean);
|
|
74
70
|
set ProvidesCover(value: boolean);
|
package/client/models/Vehicle.js
CHANGED
|
@@ -18,11 +18,13 @@ export class Vehicle extends BaseEntity {
|
|
|
18
18
|
return typeof vehicle !== 'undefined' && vehicle.exists();
|
|
19
19
|
}
|
|
20
20
|
static fromHandle(handle) {
|
|
21
|
+
if (!DoesEntityExist(handle))
|
|
22
|
+
return null;
|
|
21
23
|
return new Vehicle(handle);
|
|
22
24
|
}
|
|
23
|
-
static fromNetworkId(networkId
|
|
24
|
-
if (
|
|
25
|
-
|
|
25
|
+
static fromNetworkId(networkId) {
|
|
26
|
+
if (!NetworkDoesEntityExistWithNetworkId(networkId)) {
|
|
27
|
+
return null;
|
|
26
28
|
}
|
|
27
29
|
return new Vehicle(NetworkGetEntityFromNetworkId(networkId));
|
|
28
30
|
}
|
|
@@ -184,14 +186,8 @@ export class Vehicle extends BaseEntity {
|
|
|
184
186
|
set HasMutedSirens(value) {
|
|
185
187
|
SetVehicleHasMutedSirens(this.handle, value);
|
|
186
188
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
*/
|
|
190
|
-
set IsSirenSilent(value) {
|
|
191
|
-
SetVehicleHasMutedSirens(this.handle, value);
|
|
192
|
-
}
|
|
193
|
-
soundHorn(duration) {
|
|
194
|
-
StartVehicleHorn(this.handle, duration, Game.generateHash('HELDDOWN'), false);
|
|
189
|
+
soundHorn(duration, mode = Game.generateHash('HELDDOWN')) {
|
|
190
|
+
StartVehicleHorn(this.handle, duration, mode, false);
|
|
195
191
|
}
|
|
196
192
|
get IsWanted() {
|
|
197
193
|
return IsVehicleWanted(this.handle);
|