[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Geoipcity Module
D1NoДата: Суббота, 01.08.2009, 09:04 | Сообщение # 1
Сообщений: 507
Награды: 12
63
GeoIP SE v 2.1
By Eugene

.: Описание :.
Мой модуль для показа города игрока, широты и долготы.

http://forums.alliedmods.net/showthread.php?t=93328

Code
/**
* Lookup the full city name for the given IP address. Sets the buffer to "error" on unsuccessful lookup.
*
* @param ip        The IP address to lookup.
* @param result    The result of the geoip lookup.
* @param len        The maximum length of the result buffer.
*/
native geoip_city( const ip[], result[], len=45 );

/**
* Lookup the city's latitude for the given IP address. Returns 0 if latitude is not found.
*
* @param ip    The IP address to lookup.
* @return        The result of the geoip lookup. (float)
*/
native Float:geoip_latitude( const ip[] );

/**
* Lookup the city's longitude for the given IP address. Returns 0 if longitude is not found.
*
* @param ip    The IP address to lookup.
* @return        The result of the geoip lookup. (float)
*/
native Float:geoip_longitude( const ip[] );

.: GeoIPCity база данных :.
Просто скачайте базу данных отсюда , поместите её в папку amxmodx/data и переименуйте в GeoIPCity.dat

.: Примечания :.
example.sma это пример плагина, работающего через модуль.
или можете использовать готовый Players Info

.: Credits :.
arkshine - теперь longitudes/latitudes выдаются через float а не string
NiLuJe - скомпилил под linux

Прикрепления: example_geose.zip (2.1 Kb) · geoipse_source_.zip (675.7 Kb) · include.zip (0.6 Kb) · modules.zip (69.7 Kb)


  • Страница 1 из 1
  • 1
Поиск: