Zone::getNameOfZone

From RAGE Multiplayer Wiki
Revision as of 20:54, 28 November 2017 by Splak (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

AIRP = Los Santos International Airport
ALAMO = Alamo Sea
ALTA = Alta
ARMYB = Fort Zancudo
BANHAMC = Banham Canyon Dr
BANNING = Banning
BEACH = Vespucci Beach
BHAMCA = Banham Canyon
BRADP = Braddock Pass
BRADT = Braddock Tunnel
BURTON = Burton
CALAFB = Calafia Bridge
CANNY = Raton Canyon
CCREAK = Cassidy Creek
CHAMH = Chamberlain Hills
CHIL = Vinewood Hills
CHU = Chumash
CMSW = Chiliad Mountain State Wilderness
CYPRE = Cypress Flats
DAVIS = Davis
DELBE = Del Perro Beach
DELPE = Del Perro
DELSOL = La Puerta
DESRT = Grand Senora Desert
DOWNT = Downtown
DTVINE = Downtown Vinewood
EAST_V = East Vinewood
EBURO = El Burro Heights
ELGORL = El Gordo Lighthouse
ELYSIAN = Elysian Island
GALFISH = Galilee
GOLF = GWC and Golfing Society
GRAPES = Grapeseed
GREATC = Great Chaparral
HARMO = Harmony
HAWICK = Hawick
HORS = Vinewood Racetrack
HUMLAB = Humane Labs and Research
JAIL = Bolingbroke Penitentiary
KOREAT = Little Seoul
LACT = Land Act Reservoir
LAGO = Lago Zancudo
LDAM = Land Act Dam
LEGSQU = Legion Square
LMESA = La Mesa
LOSPUER = La Puerta
MIRR = Mirror Park
MORN = Morningwood
MOVIE = Richards Majestic
MTCHIL = Mount Chiliad
MTGORDO = Mount Gordo
MTJOSE = Mount Josiah
MURRI = Murrieta Heights
NCHU = North Chumash
NOOSE = N.O.O.S.E
OCEANA = Pacific Ocean
PALCOV = Paleto Cove
PALETO = Paleto Bay
PALFOR = Paleto Forest
PALHIGH = Palomino Highlands
PALMPOW = Palmer-Taylor Power Station
PBLUFF = Pacific Bluffs
PBOX = Pillbox Hill
PROCOB = Procopio Beach
RANCHO = Rancho
RGLEN = Richman Glen
RICHM = Richman
ROCKF = Rockford Hills
RTRAK = Redwood Lights Track
SANAND = San Andreas
SANCHIA = San Chianski Mountain Range
SANDY = Sandy Shores
SKID = Mission Row
SLAB = Stab City
STAD = Maze Bank Arena
STRAW = Strawberry
TATAMO = Tataviam Mountains
TERMINA = Terminal
TEXTI = Textile City
TONGVAH = Tongva Hills
TONGVAV = Tongva Valley
VCANA = Vespucci Canals
VESP = Vespucci
VINE = Vinewood
WINDF = Ron Alternates Wind Farm
WVINE = West Vinewood
ZANCUDO = Zancudo River
ZP_ORT = Port of South Los Santos
ZQ_UAR = Davis Quartz

Syntax

mp.game.zone.getNameOfZone(x, y, z);

Required Arguments

  • x: float
  • y: float
  • z: float

Return value

  • String

Example

let zoneNamesShort = ["AIRP","ALAMO","ALTA","ARMYB","BANHAMC","BANNING","BEACH","BHAMCA","BRADP","BRADT","BURTON","CALAFB","CANNY","CCREAK","CHAMH","CHIL","CHU","CMSW","CYPRE","DAVIS","DELBE","DELPE","DELSOL","DESRT","DOWNT","DTVINE", "EAST_V","EBURO","ELGORL","ELYSIAN","GALFISH","GOLF","GRAPES","GREATC","HARMO","HAWICK","HORS","HUMLAB","JAIL","KOREAT","LACT","LAGO","LDAM","LEGSQU","LMESA","LOSPUER","MIRR","MORN","MOVIE","MTCHIL","MTGORDO", "MTJOSE","MURRI","NCHU","NOOSE","OCEANA","PALCOV","PALETO","PALFOR","PALHIGH","PALMPOW","PBLUFF","PBOX","PROCOB","RANCHO","RGLEN","RICHM","ROCKF","RTRAK","SANAND","SANCHIA","SANDY","SKID","SLAB","STAD","STRAW", "TATAMO","TERMINA","TEXTI","TONGVAH","TONGVAV","VCANA","VESP","VINE","WINDF","WVINE","ZANCUDO","ZP_ORT","ZQ_UAR"];

let zoneNames = ["Los Santos International Airport","Alamo Sea","Alta","Fort Zancudo","Banham Canyon Dr","Banning","Vespucci Beach","Banham Canyon","Braddock Pass","Braddock Tunnel","Burton","Calafia Bridge","Raton Canyon","Cassidy Creek","Chamberlain Hills","Vinewood Hills","Chumash","Chiliad Mountain State Wilderness","Cypress Flats","Davis","Del Perro Beach","Del Perro","La Puerta","Grand Senora Desert","Downtown","Downtown Vinewood","East Vinewood","El Burro Heights","El Gordo Lighthouse","Elysian Island","Galilee","GWC and Golfing Society","Grapeseed","Great Chaparral","Harmony","Hawick","Vinewood Racetrack","Humane Labs and Research","Bolingbroke Penitentiary","Little Seoul","Land Act Reservoir","Lago Zancudo","Land Act Dam","Legion Square","La Mesa","La Puerta","Mirror Park","Morningwood","Richards Majestic","Mount Chiliad","Mount Gordo","Mount Josiah","Murrieta Heights","North Chumash","N.O.O.S.E","Pacific Ocean","Paleto Cove","Paleto Bay","Paleto Forest","Palomino Highlands","Palmer-Taylor Power Station","Pacific Bluffs","Pillbox Hill","Procopio Beach","Rancho","Richman Glen","Richman","Rockford Hills","Redwood Lights Track","San Andreas","San Chianski Mountain Range","Sandy Shores","Mission Row","Stab City","Maze Bank Arena","Strawberry","Tataviam Mountains","Terminal","Textile City","Tongva Hills","Tongva Valley","Vespucci Canals","Vespucci","Vinewood","Ron Alternates Wind Farm","West Vinewood","Zancudo River","Port of South Los Santos","Davis Quartz"];

let position = new mp.Vector3(100,100,10);
let zoneName = mp.game.zone.getNameOfZone(position.x, position.y, position.z);

if(zoneNamesShort.includes(zoneName)) {
  	let zoneID = zoneNamesShort.indexOf(zoneName);
  	let realZoneName = zoneNames[zoneID];
}

Credits to Splak

See also

Template:Zone s function c