Country On Connect - Version 1.3b - 12.17.2006 - diamond-optic
Information:
- Shows country from which a player is in when they connect.. - Can set cvars to prevent msgs being shown for admins/bots/normal users... - Select from chat, center, or hud style messages... - If using HUD messages, there's cvars to control different settings for them..
- * Requires GEOIP module *
Credit:
- santa_sh0t_tupac: fixing my sloppy coding on bot detection
CVAR:
amx_country_connect "1" //Turn on/off amx_country_connect_users "1" //Normal Users -> 1=Show / 0=Dont show amx_country_connect_admins "1" //Admins -> 1=Show / 0=Dont show amx_country_connect_bots "0" //Bots -> 1=Show / 0=Dont show
amx_country_connect_default "United States" //Country of server (for bots)
amx_country_connect_msg " * $name is playing from: $country" //Message to print //$name = client's name //$country = client's country
amx_country_connect_hudpos "1" //Hud Message Position: //1 = Center (csay) //2 = Left side (tsay) //3 = Bottom middle //4 = Custom position (use hudx & hudy cvars)
amx_country_connect_hudx "-1.0" //Hud X position (-1.0=center, 0.00=left, 1.00=right) amx_country_connect_hudy "-1.0" //Hud Y position (-1.0=center, 0.00=top, 1.00=bottom)
amx_country_connect_hudred "255" //Hud message RED value amx_country_connect_hudgreen "255" //Hud message GREEN value amx_country_connect_hudblue "255" //Hud message BLUE value
EXTRA:
Change #define ADMIN to admin level used for amx_country_connect_admins
Changelog:
- 07.11.2006 Version 1.0 Initial Release
- 08.06.2006 Version 1.1 Changed a return
- 12.09.2006 Version 1.2 If country returns "error", it prints as "Unknown"
- 12.14.2006 Version 1.3 Totally reworked the plugin, INCLUDING CVARs (SO TAKE NOTE OF THAT!!!) Fixed 'default' typo in CVAR Added CVAR to control normal users Now 3 different messages (chat, center, and hud) Various CVARs to control hud message color & position Now a CVAR string sets the message to be printed
- 12.17.2006 Version 1.3b Much better way of detecting bots (thanks santa_sh0t_tupac) Checks to make sure player is actually connected