This is the function used from the game. I know it works for Chenarus not sure about any other maps
private ["_x","_y","_xgrid","_ygrid","_xcoord","_ycoord","_result"];
_x = (_this select 0) select 0;
_y = (_this select 0) select 1;
_xgrid = floor (_x / 100);
_ygrid = floor ((15360 - _y) / 100);
_xcoord =
if (_xgrid >= 100) then {
str _xgrid;
} else {
if (_xgrid >= 10) then {
"0" + str _xgrid;
} else {
"00" + str _xgrid;
};
};
_ycoord =
if (_ygrid >= 100) then {
str _ygrid;
} else {
if (_ygrid >= 10) then {
"0" + str _ygrid;
} else {
"00" + str _ygrid;
};
};
_result = [_xcoord,_ycoord];
_result
I just tested it on utes and I had to rewrite the code this works on both islands
private ["_x","_y","_xgrid","_ygrid","_xcoord","_ycoord","_result"];
_x = (_this select 0) select 0;
_y = (_this select 0) select 1;
_cfg = configFile>>"CfgWorlds">>worldName;
Switch toLower (worldName) do{
case "utes": {_ygrid = floor ( (5120 - _y) / 100);};
case "chernarus": {_ygrid = floor ( (15360 - _y) / 100);};
default {_ygrid = floor ( (15360 - _y) / 100);};
};
_xgrid = floor (_x / 100);
_xcoord =
if (_xgrid >= 100) then {
str _xgrid;
} else {
if (_xgrid >= 10) then {
"0" + str _xgrid;
} else {
"00" + str _xgrid;
};
};
_ycoord =
if (_ygrid >= 100) then {
str _ygrid;
} else {
if (_ygrid >= 10) then {
"0" + str _ygrid;
} else {
"00" + str _ygrid;
};
};
_result = [_xcoord,_ycoord];
_result;