AreZonesAt

From Spheriki

Jump to: navigation, search

Check if there are any zones at a map location.


Contents

Usage

boolean AreZonesAt(x, y, layer);
  • x number. The map pixel X coordinate to check.
  • y number. The map pixel Y coordinate to check.
  • layer number, non-negative. The map layer to check.
  • boolean is returned, true if there are zones at the location, false otherwise.


Examples

To check if a person named 'Bob' is in any zones:

var x = GetPersonX("Bob");
var y = GetPersonY("Bob");
var l = GetPersonLayer("Bob");
if (AreZonesAt(x, y, l)) {
  ExecuteZones(x, y, l);
  // Do other stuff
}


Notes

  • At the time of writing, the layer parameter is ignored, though it must still be valid.
  • The map engine must be running for this function to work.


See also

Personal tools