rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
21 lines (20 loc) • 958 B
JavaScript
/// <reference types="@classic-mp/types/client" />
/**
* Реализация `IZoneManager` под CCMP.
*
* RageMP `mp.game.zone.getNameOfZone` маппится 1:1 на GTA V натив
* `GET_NAME_OF_ZONE` (`0x7875CE91B4119A5F`), который в CCMP экспонирован
* как `ccmp.natives.zone.getNameOfZone`. Натив возвращает GXT-ключ зоны
* (например, `"VINE"`, `"DOWNT"`, `"AIRP"`) — локализуется в UI через
* `getLabelText(key)`.
*
* **Hot path:** вызывается ~раз в секунду из `HudController.onInterval` →
* `HudService.syncCurrentLocation` → `LocationService.getLocationByCords`
* → `RockModLocationAdapter.getRegionByCords`. Парная с
* `CCMPPathfindManager.getStreetNameAtCoord`.
*/
export class CCMPZoneManager {
getNameOfZone(position) {
return ccmp.natives.zone.getNameOfZone(position.x, position.y, position.z);
}
}