@nativewrappers/redm 0.0.45 → 0.0.46
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/Controls.d.ts +7 -0
- package/Controls.js +14 -0
- package/entities/Ped.d.ts +1 -0
- package/entities/Ped.js +6 -0
- package/enums/Keys.d.ts +804 -7
- package/enums/Keys.js +806 -9
- package/enums/index.d.ts +1 -0
- package/enums/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
package/Controls.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KeyHash } from "./enums/Keys";
|
|
2
|
+
export declare class Controls {
|
|
3
|
+
static IsInputJustPressed(hash: KeyHash): boolean;
|
|
4
|
+
static IsInputPressed(hash: KeyHash): boolean;
|
|
5
|
+
static IsDisabledInputPressed(hash: KeyHash): boolean;
|
|
6
|
+
static DisableControl(hash: KeyHash): void;
|
|
7
|
+
}
|
package/Controls.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class Controls {
|
|
2
|
+
static IsInputJustPressed(hash) {
|
|
3
|
+
return IsControlJustPressed(0, hash);
|
|
4
|
+
}
|
|
5
|
+
static IsInputPressed(hash) {
|
|
6
|
+
return IsControlPressed(0, hash);
|
|
7
|
+
}
|
|
8
|
+
static IsDisabledInputPressed(hash) {
|
|
9
|
+
return IsDisabledControlPressed(0, hash);
|
|
10
|
+
}
|
|
11
|
+
static DisableControl(hash) {
|
|
12
|
+
DisableControlAction(0, hash, false);
|
|
13
|
+
}
|
|
14
|
+
}
|
package/entities/Ped.d.ts
CHANGED
package/entities/Ped.js
CHANGED
|
@@ -331,4 +331,10 @@ export class Ped extends BaseEntity {
|
|
|
331
331
|
applyDamagePack(damagePack, damage, mult) {
|
|
332
332
|
ApplyPedDamagePack(this.Handle, damagePack, damage, mult);
|
|
333
333
|
}
|
|
334
|
+
get CurrentVehicle() {
|
|
335
|
+
const veh = GetVehiclePedIsIn(this.Handle, false);
|
|
336
|
+
if (veh === 0)
|
|
337
|
+
return null;
|
|
338
|
+
return new Vehicle(veh);
|
|
339
|
+
}
|
|
334
340
|
}
|