Raised This Month: $159 Target: $400

Country Nick Plugin

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Junior Member
Join Date: Nov 2008
Location: France
Plugin ID:
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Add country flag of the player in his/her nickname
    Old 01-05-2009 , 13:02   Country Nick Plugin
    Reply With Quote #1

    This plugin adds the country flag in his/her nickname and announces the player country when he/she connects to the server. This is NOT a country filter plugin.

    Example :
    Chat message : nickname from USA joined the game
    nickname becomes [US]nickname in the scoreboard
    if the country is unknown, [--]nickname

    Requirements :
    • Sourcemod 1.1 (function SetClientInfo only available since 1.1)
    • GeoIP (included in Sourcemod)
    Known bugs :
    • Flag is not set back when players changes his/her nickname ingame (need help on this one, I get infinite loop : hooked player_changename, when player changes name, player_changename is fired, I add the flag into the new nick and set the new nick, player_changename is fired again, etc.)
    • The plugin does not use the translation layer of soucemod. It's only two phrases so ... edit and recompile source.
    • Does not work on Windows servers (see bug 3569 : https://bugs.alliedmods.net/show_bug.cgi?id=3569 ); plugin development halted until this bug is fixed.
    • Sometime you can see the player changing his name twice ([UK]oldname => newname => [UK]newname).
    • According to some people in this thread, this plugin does not work on Windows servers. Awaiting infos...
    Changelog :
    • 1.0 - Initial release
    • 1.1
      • Fixed ingame change name (thx Antithasys)
      • Added translation support
      • unknown country => "[--]nickname" instead of "nickname"
    • 1.1.1
      • Fixed warning 219 at compile time
    Plan :
    • Ability to custom format the nickname
    • Cvar to disable announcer
    Setup :
    Put countrynick.smx in plugins and countrynick.phrases.txt in translations. The archive translations.zip contains pl and de languages at the moment.

    Misc :
    I couldn't found a plugin that adds the flag to the nickname so I made it. It was done for my L4D server but It should work on any other game.

    I advice you to update from time to time your GEOIP database to keep the current country <=> IP up to date. The database can be downloaded here http://geolite.maxmind.com/download/...y/GeoIP.dat.gz
    Attached Files
    File Type: sp Get Plugin or Get Source (countrynick.sp - 14148 views - 3.1 KB)
    File Type: txt countrynick.phrases.txt (300 Bytes, 8142 views)
    File Type: zip translations.zip (1.1 KB, 6979 views)

    Last edited by AeN0; 03-28-2009 at 21:10. Reason: windows servers
    AeN0 is offline

    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 12:55.

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