From a95ed206cfab34a406d6c4d8970a17a2c975bdbb Mon Sep 17 00:00:00 2001 From: hydrant Date: Tue, 6 Apr 2021 20:33:26 +0200 Subject: [PATCH] ivehicle class --- ReallifeGamemode.Client/core/rage-mp/entities.ts | 7 +++++++ ReallifeGamemode.Client/game.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/ReallifeGamemode.Client/core/rage-mp/entities.ts b/ReallifeGamemode.Client/core/rage-mp/entities.ts index 537c765e..9073acc4 100644 --- a/ReallifeGamemode.Client/core/rage-mp/entities.ts +++ b/ReallifeGamemode.Client/core/rage-mp/entities.ts @@ -249,6 +249,13 @@ class RageVehicle extends RageEntity implements IVehicle { this.vehicle.setDoorShut(door, instantly); } + + get class(): number { + if (mp.vehicles.exists(this.vehicle)) { + return this.vehicle.getClass(); + } + return -1; + } } diff --git a/ReallifeGamemode.Client/game.ts b/ReallifeGamemode.Client/game.ts index 84d9f67c..db02729b 100644 --- a/ReallifeGamemode.Client/game.ts +++ b/ReallifeGamemode.Client/game.ts @@ -69,6 +69,7 @@ interface IVehicle extends IEntity { setDoorsLocked(state: boolean); setDoorShut(door: number, instantly: boolean); setDoorOpen(door: number, loose: boolean, instantly: boolean); + class: number; } interface IEntityPool {