UNPKG

rock-mod

Version:

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

33 lines (32 loc) 949 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AltVEntity = void 0; const AltVWorldObject_1 = require("../worldObject/AltVWorldObject"); var hash = AltVShared.hash; const utils_1 = require("../../../../shared/common/utils"); var Vector3 = AltVShared.Vector3; class AltVEntity extends AltVWorldObject_1.AltVWorldObject { get model() { return this.mpEntity.model; } get rotation() { const { x, y, z } = this.mpEntity.rot; return new utils_1.Vector3D(x, y, z); } constructor(options) { super(options); } setModel(value) { this.mpEntity.model = hash(value); } setRotation(value) { this.mpEntity.rot = new Vector3(value); } getNetData(name) { return this.mpEntity.getSyncedMeta(name); } setNetData(name, value) { this.mpEntity.setSyncedMeta({ name, value }); } } exports.AltVEntity = AltVEntity;