Raised This Month: $ Target: $400
 0% 

[L4D2] Add Player Country to Name (Connections messages and admin indication)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
n3wton
Senior Member
Join Date: Mar 2010
Plugin ID:
1543
Plugin Version:
2.5.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Add a players location to the end of there name, shows connection messages and indicated wether a user is an admin.
    Unapprover:
    Reason for Unapproving:
    Errors unfixed for months
    Old 03-21-2010 , 00:30   [L4D2] Add Player Country to Name (Connections messages and admin indication)
    Reply With Quote #1

    [IMG]http://img407.**************/img407/4134/descriptiono.png[/IMG]

    This is my first plugin, it took me about 6 hours to learn how to write it and make it work.

    Basically it adds a players location tag (e.g. UK, US, FR ) to the end of a players name.
    Example: N3wton [UK]

    if a user is an admin the players name will look more like this:
    Example: (A)N3wton [UK]

    It also has an option to show a welcome message as players connect, this can be turned off.
    The player join message can be changed in the .cfg, but the default is...
    Example: N3wton from the United Kingdom has joined.
    (admin users will be shown in yellow)

    As I say this is my first plugin, so please be kind and suggest improvements.

    NOTE
    There is an error in the Left4Dead2 gamedata( in SorceMod 1.3.1) file located at...
    "left4dead2/addons/sourcemod/gamedata/sdktools.games/engine.l4d2.txt"
    the SetUserCvar for windows is set at 18, where as the correct value is 17.
    I recommend updating your server to the latest STABLE snapshot located here.
    (note: this bug only effects windows servers, linux servers should run fine)

    [IMG]http://img91.**************/img91/4416/commandsm.png[/IMG]
    sm_pactlist, !pactlist
    lists all the connected players and the countries.

    [IMG]http://img638.**************/img638/898/cvars.png[/IMG]

    // Layout of how and what the admin tag should look like (Note: {NAME} equates to the string genorated from PACT_Name_Layout)
    PACT_Admin_Layout "(A) {NAME}"

    // Layout of how !pactlist should be displayed
    PACT_List_Layout "{NAME} is from {CITY} in {LOC}"
    // Layout of how the clients name should look ( Note: If you do not want a tag to be shown in the clients name, set this CVar to "{NAME}" )
    PACT_Name_Layout "{NAME} [{TAG}]"

    // Show a message on player join ('PLAYER' from 'LOCATION' has joined)
    PACT_Player_Join_Message "1"

    // Format of the welcome message, {NAME} = player name, {LOC} = country, {CITY} = city
    PACT_Player_Join_Message_Layout "{NAME} from {CITY} in {LOC} has joined."
    // Highlight admins in yellow in chat messages
    PACT_Show_Admin_Messages "1"

    // Put admintag infront of all admins in score
    PACT_Show_Admin_Score "1"

    // Version of the Player Add Country Tag (PACT) plugin.
    PACT_Version "2.5.0"

    [IMG]http://img144.**************/img144/7894/screenshotsb.png[/IMG]
    Left4Dead2 - Scoreboard
    [IMG]http://img13.**************/img13/5660/scoreso.png[/IMG]

    [IMG]http://img641.**************/img641/1209/pactnewscores.png[/IMG]

    Left4Dead2 - Connection Messages
    [IMG]http://img130.**************/img130/8231/connectionmsg.png[/IMG]

    Left4Dead2 - List Players via sm_pactlist (or !pactlist)
    [IMG]http://img641.**************/img641/953/listplayers.png[/IMG]


    [IMG]http://img202.**************/img202/2596/changelog.png[/IMG]
    * Version 2.5.0
    - Fixed some bugs
    - Added Client City Support
    - Removed Typos

    * Version 2.0.0
    - Complete rewrite to generally tidy up all the code.
    - Should now work with SourceMod 1.4
    - Added more Cvars for fuller customisation

    * Version 1.1.0
    - Now supports showing of admins, and has two extra cvars
    (if updating from an old version please remove the .cfg file)

    * Version 1.0.2
    - Fixed a small gramitical error if the players location is unknown.

    * Version 1.0.1:
    -Added sm_pactlist (!pactlist) command.

    * Version 1.0.0:
    -Initial Release

    NOTE:
    As this plugin now uses my geocity include, it will no longer compile on the web (get plugin button) as the web compiler doesn't have my include. If you only want the plugin pleae download the PlayerAddCountryTag.smx file. If you wish to compile the sourcecode for yourself, please follow the instructions located here.

    Setting Up City name Use:
    1 - Download PlayerAddCountryTag.smx and put in addons\sourcemod\plugins on your server.
    2 - Download GeoLiteCity.zip and extract the GeoLiteCity.sq3 into addons\sourcemod\data\sqlite on your server.
    3 - if you are updating from an older version, please delete the PlayerAddCountryTag.cfg from cfg\sourcemod
    4 - Restart your server

    For Use without City names:
    1 - Download the PlayerAddCountryTag - No Cites version of the plugin (via get plugin button ) and put in addons\sourcemod\plugins on your server.
    2 - Restart your server.

    Additional Downloads

    GeoLiteCity.zip {RapidShare}
    GeoLiteCity.zip {MegaUpload}

    Yours
    N3wton
    Attached Files
    File Type: smx PlayerAddCountryTag.smx (9.7 KB, 3113 views)
    File Type: sp Get Plugin or Get Source (PlayerAddCountryTag.sp - 1869 views - 9.7 KB)
    File Type: sp Get Plugin or Get Source (PlayerAddCountryTag - No Cities.sp - 4892 views - 8.9 KB)

    Last edited by n3wton; 04-15-2010 at 05:40.
    n3wton is offline
     



    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 23:41.


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