Raised This Month: $12 Target: $400
 3% 

Country & City Menu (and more features)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Hawk552 (427)
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-26-2009 , 17:45   Country & City Menu (and more features)
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (cc_menu.sma - 1408 views - 7.9 KB)
File Type: inc geoip.inc (5.3 KB, 1222 views)
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 09-29-2009 at 02:11.
Alucard^ is offline
Send a message via Skype™ to Alucard^
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 09-26-2009 , 17:46   Re: Country & City Menu
Reply With Quote #2

Nice ,i will use in my server =D

Last edited by #8 SickneSS; 09-26-2009 at 17:48.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-26-2009 , 17:53   Re: Country & City Menu
Reply With Quote #3

MSG_ONE -> MSG_ONE_UNRELIABLE
__________________
xPaw is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-26-2009 , 17:56   Re: Country & City Menu
Reply With Quote #4

You require <cstrike> yet you list it as "Modification: ALL"
__________________
fysiks is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-26-2009 , 18:06   Re: Country & City Menu
Reply With Quote #5

@xPaw

Thx, updated.

@fysiks

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

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 09-26-2009 , 18:08   Re: Country & City Menu
Reply With Quote #6

very nice, thanks!!!

+k
KadiR is offline
kamilgrycuk
Junior Member
Join Date: May 2009
Location: Poland
Old 09-26-2009 , 21:21   Re: Country & City Menu
Reply With Quote #7

nice plugin
__________________
kamilgrycuk is offline
Send a message via Skype™ to kamilgrycuk
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 09-26-2009 , 21:42   Re: Country & City Menu
Reply With Quote #8

Nice, CC o.0
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-26-2009 , 21:47   Re: Country & City Menu
Reply With Quote #9

GJ Alucard!
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Kabuto
Senior Member
Join Date: Apr 2009
Location: Lithuania
Old 09-27-2009 , 02:04   Re: Country & City Menu
Reply With Quote #10

Nice plugin. I will try this ;)
Kabuto is offline
Send a message via Skype™ to Kabuto
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:04.


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