AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Country & City Menu (and more features) (https://forums.alliedmods.net/showthread.php?t=104719)

Alucard^ 09-26-2009 17:45

Country & City Menu (and more features)
 
2 Attachment(s)
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
    • First Release.
  • 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.

#8 SickneSS 09-26-2009 17:46

Re: Country & City Menu
 
Nice ,i will use in my server =D

xPaw 09-26-2009 17:53

Re: Country & City Menu
 
MSG_ONE -> MSG_ONE_UNRELIABLE

fysiks 09-26-2009 17:56

Re: Country & City Menu
 
You require <cstrike> yet you list it as "Modification: ALL"

Alucard^ 09-26-2009 18:06

Re: Country & City Menu
 
@xPaw

Thx, updated.

@fysiks

Yes, i believe that i used "Counter-Strike" in the Modification... but well, don't know, changed.

KadiR 09-26-2009 18:08

Re: Country & City Menu
 
very nice, thanks!!! :)

+k

kamilgrycuk 09-26-2009 21:21

Re: Country & City Menu
 
nice plugin

AntiBots 09-26-2009 21:42

Re: Country & City Menu
 
Nice, CC o.0 :D

joropito 09-26-2009 21:47

Re: Country & City Menu
 
GJ Alucard!

Kabuto 09-27-2009 02:04

Re: Country & City Menu
 
Nice plugin. I will try this ;)


All times are GMT -4. The time now is 10:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.