AMX Mod X API Documentation

Signature
#define SYSTEM_METRIC 0 // kilometers#define SYSTEM_IMPERIAL 1 // statute miles
Description

Calculate the distance between geographical coordinates, latitude and longitude.

Notes
  • This native requires GeoIP City database, which can be retrieved from:

    http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary)

Parameters
  • lat1 The first IP latitude.
  • lon1 The first IP longitude.
  • lat2 The second IP latitude.
  • lon2 The second IP longitude.
  • system The system of measurement, 0 = Metric(kilometers) or 1 = English(miles).
Returns

The distance as result in specified system of measurement.

Назад
Верх