UNPKG

rock-mod

Version:

Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.

18 lines (17 loc) 625 B
import { RageEntitiesManager } from "../entity/RageEntitiesManager"; import { RagePed } from "./RagePed"; export class RagePedsManager extends RageEntitiesManager { constructor() { super({ baseObjectsType: "ped", }); } create(options) { const { model, position, dimension, rotation } = options; const mpEntity = mp.peds.new(mp.game.joaat(model), new mp.Vector3(position), rotation.z, dimension); mpEntity.isExists = () => mp.peds.exists(mpEntity); const ped = new RagePed({ mpEntity }); this.registerBaseObject(ped); return ped; } }