Description:
With a Menu of all players in the server, you can select one player and see their country and city (and timezone too). Also you can use 3 types to show the info.
I made this plugin to Xtreme-Surfs, and the person who request this, told me that don't have problem if i want to release this so, i am here.
Commands:
- /country: To open the menu of all players in the server.
- amx_distance: Usage <player1> <player2>
- Distance between player1 and player2.
- The acces flag default is for all players. See Extra Notes to change this.
- Displayed in the console:
Code:
--------------------------------------------------------
[ Target 1: Alucard^ | Target 2: Alucard^ ]
Distance: 0.000000
----------------------------------------------------
Cvars:
- cc_enable [Default: 1] * NEW
- 0: Completely disable the plugin.
- 1: Enable the plugin.
- cc_showcode [Default: 1] * NEW
- 0: Show only the name of the players in the menu.
- 1: Show the region code in the menu with 2 letters. Example: [AR].
- 2: Show the region code in the menu with 3 letters. Example: [ARG].
- cc_showmode [Default: 1]
- 0: Disable the menu. * CHANGED
- 1: You see the info of the player in chat msg.
- 2: You see the info of the player in HUD msg.
- 3: You see the info of the player in a MOTD.
- cc_onlyadmins [Default: 0]
- 0: All players can use country menu.
- 1: Only admins can use country menu.
Images:
Country Menu
Chat Mode
Hud Mode
MOTD Mode
In the Country Menu image, you see "[]" Well, that should be "[AR]" (Argentina). But i tested in LAN and the ip is loopback so....
If someone can take an image with some players in a SERVER, of the country menu... will be very good.
Extra Notes:
1) In the top of the plugin you can change some things... if you are using the Hud Msg Mode (cc_showmode 2). Or for change ACCES FLAGS.
Code:
//--------------------START EDIT------------------------//
#define DURATION 8.0
#define RED 255
#define GREEN 255
#define BLUE 255
#define POS_X 0.02
#define POS_Y 0.23
#define is_user_admin2(%1) (get_user_flags(%1) & ADMIN_KICK)
#define CMD_FLAG ADMIN_ALL
//--------------------END EDIT-------------------------//
2) If you are in a buyzone and you use /country, when the menu is open the plugin hide the buyzone icon (Only with CS Mod ofcourse).
3) This plugin work on ALL mod but in Counter-Strike Mod have some specific functions, like chat color and the point
2).
Requirements:
Code:
#include <cstrike> /* Only if your Mod is CS */
#include <geoip>
This plugin use Module GeoIP Extended so you need this module:
http://forums.alliedmods.net/showthread.php?t=95665
Also, remember to:
Quote:
Originally Posted by Arkshine
Download GeoLiteCity then extract it to data folder ( /amxmodx/data/ ) and rename it to GeoIPCity.dat.
|
Credits:
- Arkshine & xPaw - GeoIP Extended Module.
- xPaw - Idea to replace the "error" message.
- joropito - Helped me with a change in the chat_color stock.
- Kiske - Suggested the distance in /country.
Changelog:
- Version 1.0
- Version 1.1
- MSG_ONE -> MSG_ONE_UNRELIABLE.
- Version 1.2
- Added 2 cvars and changed a minor thing in the showmode cvar.
- Added a new command for see the distance between 2 players.
- Added Distance in the info of country, city, etc.
- Changed "error" to "Unknow City/TimeZone" if the plugin doesn't detect the City (becouse is not 100% accurate).
- Modification changed to ALL (See Extra Notes).
- Version 1.3
- Now the plugin have support for all mods but have some specific functions in CS Mod, see Extra Notes (Not tested, becouse i don't have other Mods).
P.S 1: Sry if i writed something wrong... correct me if i did it... My english isn't perfect.