rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
34 lines (33 loc) • 1.12 kB
JavaScript
/// <reference types="@classic-mp/types/client" />
import { Vector3D } from "../../../../shared/common/utils";
export class CCMPUiManager {
getStreetNameFromHashKey(hash) {
return ccmp.natives.hud.getStreetNameFromHashKey(hash);
}
getLabelText(labelName) {
if (!ccmp.natives.hud.doesTextLabelExist(labelName)) {
return labelName;
}
const text = ccmp.natives.hud.getFilenameForAudioConversation(labelName);
return text && text !== "NULL" ? text : labelName;
}
hideHudComponentThisFrame(componentIndex) {
ccmp.natives.hud.hideHudComponentThisFrame(componentIndex);
}
displayRadar(display) {
ccmp.natives.hud.displayRadar(display);
}
setPauseMenuActive(toggle) {
ccmp.natives.hud.setPauseMenuActive(toggle);
}
setWaypoint(x, y) {
ccmp.natives.hud.setNewWaypoint(x, y);
}
deleteWaypoint() {
ccmp.natives.hud.setWaypointOff();
}
getBlipInfoIdCoord(blip) {
const { x, y, z } = ccmp.natives.hud.getBlipInfoIdCoord(blip);
return new Vector3D(x, y, z);
}
}