rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
31 lines (30 loc) • 896 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RageEntity = void 0;
const RageWorldObject_1 = require("../worldObject/RageWorldObject");
const utils_1 = require("../../../../shared/common/utils");
class RageEntity extends RageWorldObject_1.RageWorldObject {
get model() {
return this.mpEntity.model;
}
get rotation() {
const { x, y, z } = this.mpEntity.rotation;
return new utils_1.Vector3D(x, y, z);
}
constructor(options) {
super(options);
}
setModel(value) {
this.mpEntity.model = mp.joaat(value);
}
setRotation(value) {
this.mpEntity.rotation = new mp.Vector3(value);
}
getNetData(name) {
return this.mpEntity.getVariable(name);
}
setNetData(name, value) {
this.mpEntity.setVariable(name, value);
}
}
exports.RageEntity = RageEntity;