aaaaaaaaa
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { IEntity, IPlayer, IEntityAttachments, IEntityAttachmentPool, IPlayerPool, IVehicle, IVehiclePool, VehicleSeat, EntityType } from "../../game";
|
||||
import { parseJson } from "../../util";
|
||||
import game from "../..";
|
||||
|
||||
class RageEntity implements IEntity {
|
||||
private entity: EntityMp;
|
||||
@@ -184,11 +185,22 @@ class RageVehicle extends RageEntity implements IVehicle {
|
||||
|
||||
class RageVehiclePool implements IVehiclePool {
|
||||
at(id: number): IVehicle {
|
||||
return new RageVehicle(mp.vehicles.atRemoteId(Number(id)));
|
||||
var veh = mp.vehicles.atRemoteId(Number(id));
|
||||
|
||||
if (!veh) {
|
||||
game.ui.sendChatMessage("pool.at - veh is null")
|
||||
return null;
|
||||
}
|
||||
|
||||
return new RageVehicle(veh);
|
||||
}
|
||||
|
||||
forEach(fn: (entity: IVehicle) => void): void {
|
||||
mp.vehicles.forEach(e => {
|
||||
if (!e) {
|
||||
game.ui.sendChatMessage("forEach - e is null");
|
||||
return;
|
||||
}
|
||||
fn(new RageVehicle(e));
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user