UNPKG

rock-mod

Version:

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

20 lines (19 loc) 635 B
import { RageWorldObjectsManager } from "../worldObject/RageWorldObjectsManager"; import { RageBlip } from "./RageBlip"; export class RageBlipsManager extends RageWorldObjectsManager { constructor() { super({ baseObjectsType: "blip", }); } create(options) { const { sprite, position } = options; const mpEntity = mp.blips.new(sprite, new mp.Vector3(position), options); mpEntity.isExists = () => mp.blips.exists(mpEntity); const blip = new RageBlip({ mpEntity: mpEntity, }); this.registerBaseObject(blip); return blip; } }