Raised This Month: $96 Target: $400
 24% 

Connect Announce


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Plugin ID:
544
Plugin Version:
1.8
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1058 
    Plugin Description:
    Replacement of standard player connected message, allows for custom join messages.
    Old 09-10-2008 , 07:36   Connect Announce
    Reply With Quote #1

    Connect Announce - By Arg!

    Description:
    Replacement for standard connection and disconnection message for players. Displays country and steam id of joining player. Colors are fully customizable by editing the file 'addons\sourcemod\data\cannounce_settings.txt '. Allows for custom join messages eg, players can set a message that will display every time they connect to the server. This is not open to all players as they have to be allowed by an admin prior to setting their message. Menu integration included for allowing/disallowing custom join messages.

    Notes:
    The connect messages show later than the default one, as the player has to be authorized (steam id validated, and sourcemod admin checked) before we can use it. ROOT privileges are required to allow/disallow join messages but this can be changed in the code at the top of joinmsg.sp
    This plugin stores custom join messages and sound paths in the file 'addons\sourcemod\data\cannounce_messages.txt '. If you manually edit this file, you will need to restart the plugin for changes to apply. If you do not the file may be overwritten on map change, without your changes.
    Plugin settings such as the player connect message are stored in the file 'addons\sourcemod\data\cannounce_settings.txt '
    When adding join sounds, all paths are to be specified relative to the sounds folder of your mod, eg the sound path 'player\death.wav' refers to the path '<modname>\sounds\player\death.wav'. Any sound included in your game/mod can be used, or any custom sound, depending on your sv_pure setup. Any custom sound specified will automatically be downloaded to all clients on map change.
    MP3's do work as custom join sounds but they may need to be amplified to make them work as well as wav's.
    This plugin contains support for the GeoIPCity sourcemod extension by GoD-Tony which adds extra player location based information and should be faster than the core sourcemod location information API. The extension is NOT required to run this plugin and if it is not present will use the default information provided by core sourcemod. Use the link above for more information on installing GeoIPCity extension.

    Commands:
    • sm_geolist <name or #userid> - lists player(s) and their country.
    • sm_joinmsg [message] - (console command) player can use this to set their custom join message (if allowed) or if no message provided will display their currently set message.
    • sm_joinmsgon <name or #userid> - allow target to set their custom join message.
    • sm_joinmsgonid '<steamId>' '<player name>' - allows specified steam id to set a custom join message, useful if player not in game. Player name is only an indicator so the file storing the messages is human readable.
    • sm_joinmsgoff <name or #userid> - disallow target from having a custom join message.
    • sm_joinmsgoffid '<steamId>' - disallow specified steam id from having a custom join message.
    • sm_setjoinmsg <name or #userid> '<message>' - set a custom join message for target, if they are allowed to have one.
    • sm_setjoinmsgid '<steamId>' '<message>' - set a custom join message for steam id, if it is allowed
    • sm_setjoinsnd <name or #userid> '<sound file path>' - set a custom join sound for target, if they are allowed to have one.
    • sm_setjoinsndid '<steamId>' '<sound file path>' - set a custom join sound for steam id, if it is allowed
    • sm_playsnd '<sound file path>' - plays sound file to all clients, useful for testing sound files before applying to a client.
    Cvars:
    • sm_ca_connectdisplaytype - <1|0> if 1 then displays enhanced connect message after admin check and allows the {PLAYERTYPE} placeholder. If 0 displays enhanced connect message on client auth (earlier) and disables the {PLAYERTYPE} placeholder
    • sm_ca_disableclientmsgchange - prevent ALL clients from setting their own custom join message.
    • sm_ca_showenhanced <1|0> - shows the enhanced player connect message from this plugin.
    • sm_ca_showenhanceddisc <1|0> - shows the enhanced player disconnect message from this plugin.
    • sm_ca_showstandard <1|0> - shows the standard player connect message.
    • sm_ca_showstandarddisc <1|0> - shows the standard player disconnect message.
    • sm_ca_showenhancedadmins <1|0> - shows a different enhanced connect/disconnect message to admins with the generic flag. Message customised in /data/cannounce_settings.txt'
    • sm_ca_autoallowmsg <1|0> - allows admins with the kick flag to always be able to set a custom join message.
    • sm_ca_playsound <1|0> - if enabled, plays a sound on each player connect.
    • sm_ca_playsoundfile <sound file path> - specifies sound file to play if sm_ca_playsound is enabled.
    • sm_ca_playdiscsound <1|0> - if enabled, plays a sound on each player disconnect.
    • sm_ca_playdiscsoundfile <sound file path> - specifies sound file to play if sm_ca_playdiscsound is enabled.
    • sm_ca_mapstartnosound (float, defaults to 30.0) - specify time to play NO connect sounds after map start
    Thanks to:
    Install Instructions:
    • 'plugins/cannounce.smx' goes into 'sourcemod/plugins'
    • 'translations/cannounce.phrases.txt' goes into 'sourcemod/translations'
    • after loading plugin, file 'cfg/sourcemod/cannounce.cfg' gets created and can be modified to change default cvar settings
    • after loading plugin, file 'addons/sourcemod/data/cannounce_settings.txt' gets created which can be used to change the connect/disconnect messages. Here you can customise the standard messages and the ones displayed to admins when sm_ca_showenhancedadmins is set.
    Placeholder Constants:

    Connect/Disconnect messages can be customized in the file 'addons/sourcemod/data/cannounce_settings.txt' which gets created on initial plugin load. The following placeholders can be used to customize the messages:
    • {PLAYERNAME} - Players name
    • {PLAYERTYPE} - Displays 'Admin' if the client has the generic admin flag, otherwise 'Player'
    • {STEAMID} - Players steam ID
    • {PLAYERCOUNTRY} - Players country eg. Australia
    • {PLAYERCOUNTRYSHORT} - Players country code eg. AU
    • {PLAYERCOUNTRYSHORT3} - 3 letter Players county code eg. AUS - Only if GeoIPCity extension present
    • {PLAYERREGION} - Player region if applicable - Only if GeoIPCity extension present
    • {PLAYERCITY} - Player city - Only if GeoIPCity extension present
    • {PLAYERIP} - IP address of player
    • {DISC_REASON} - Enhanced disconnect message only. Displays player disconnect reason.
    Color Placeholders:

    Color placeholders are obtained from [INC] Multi Colors which in turn gets its colors from

    [INC] Colors (1.0.5)
    and
    [INC] More Colors (1.9.1)

    Which are available depending on the version of the Source engine your game is using. Please see those threads for availble colors.


    When setting custom join messages, you can use any available color placeholders:

    If you join the server from a local area network, this plugin will detect it. In this instance you can set what is displayed in the location based placeholders in the cannonce.phrases.txt file.

    Changelog:

    10th September 2008 - 0.1
    • Initial Release
    11th September 2008 - 0.2
    • IMPORTANT NOTE: After installing and loading this version (if you are upgrading) you MUST delete the file 'cfg/sourcemod/cannounce.cfg' and then restart the server.
    • Updated geolist to return list to console or chat, depending on where it was called from.
    • Enhanced play join message can now be configured from the translation file 'cannounce.phrases.txt'
    • Removed cvar 'sm_ca_showsteamid'
    • Client recieves a message when they are allowed to set their custom join message.
    18th September 2008 - 0.3
    • IMPORTANT NOTE: Before installing and loading this version (if you are upgrading) you MUST delete the file 'cfg/sourcemod/cannounce.cfg'. No need for a server restart this time.
    • Now compiled with sourcemod 1.0.4
    • IP Address now shown by default in enhanced player join message
    • Added cvar sm_ca_autoallowmsg to allow admins with Kick flag to always be allowed to set custom join messages.
    28th December 2008 - 0.4
    • Bots no longer are announced when joining in Left 4 Dead.
    • Custom sounds are available for custom join annoucement. Custom sounds do not download to clients in Left 4 Dead.
    7th February 2009 - 0.5
    • Compiled with Sourcemod 1.1
    • Fix to allow plugin to work along side HLStatsX (thanks to psychonic)
    18th February 2009 - 0.5.1
    • IMPORTANT NOTE: If you have been running any version prior to 0.5.1 and you run a stats package such as HLStatsX:CE or Psychostats, please read this post
    • Fixed issue relating to psychostats duplicating players (thanks to psychonic...again)
    28th March 2009 - 0.6
    • IMPORTANT NOTE: After installing and loading this version your MUST delete the file 'cfg/sourcemod/cannounce.cfg' and then restart the server. If you have customized this file, check for non default settings and edit the file after restarting.
    • Compiled with sourcemod 1.2.0
    • Connect/Disconnect messages are no longer driven by the translation file (which is now excluded from package), instead a key/value file is created to customize this info (addons/sourcemod/data/cannounce_settings.txt)
    • Added ability to customize color and other information in connect/disconnect messages.
    • Removed translation file
    • removed cvar sm_ca_logconnects as it no longer functions
    • Added enhanced disconnect message and sm_ca_showenhanceddisc cvar to toggle it.
    13th April 2009 - 0.7
    • Fixed issue where bots would display disconnect messages
    23rd June 2009 - 0.8
    • IMPORTANT UPGRADE NOTE: After updating and loading this version your MUST delete the file 'cfg/sourcemod/cannounce.cfg'. If you have customized this file, check for non default settings and edit the file after reloading the plugin.
    • Added color placeholder system to custom join message
    • Added cvar 'sm_ca_playsound' to enable a sound to be played on player connect.
    • Added cvar 'sm_ca_playsoundfile' to specify sound file to be played on player connect.
    • Added cvar 'sm_ca_showstandarddisc' to disable game default player disconnect message.
    29th September 2009 - 0.9
    • IMPORTANT UPGRADE NOTE: After updating and loading this version your MUST delete the file 'cfg/sourcemod/cannounce.cfg'. If you have customized this file, check for non default settings and edit the file after reloading the plugin.
    • Compiled with SourceMod 1.2.2
    • Moved all player join sound code to ensure only the standard join sound plays (if enabled) OR the custom join sound (if set) rather than both.
    • Added cvar 'sm_ca_playdiscsound' to enable a sound to be played on player disconnect.
    • Added cvar 'sm_ca_playdiscsoundfile' to specify sound file to be played on player disconnect.
    • Fix to prevent join messages spamming if server is full and player attempts to connect in some games.
    • Added message placeholder {PLAYERTYPE}' which will display 'Admin' if the client has the generic adming flag or 'Player' if not.
    • Moved connecting annoucement code from client auth to post admin check to allow '{PLAYERTYPE}' to function. This had the unintended effect of displaying the connect messages (and sounds) to the joining client.
    • Added message placeholder '{YELLOW}' for the new text color added into TF2
    9th November 2009 - 1.0
    • IMPORTANT UPGRADE NOTE: After updating and loading this version your MUST delete the file 'cfg/sourcemod/cannounce.cfg'. If you have customized this file, check for non default settings and edit the file after reloading the plugin.
    • Added sm_ca_connectdisplaytype cvar to control when connect messages are displayed.
    • Added placeholder {DISC_REASON} to display disconnect reason in enhanced message.
    • Command sm_joinmsg now requires quotes around the parameter; fix for causing problems in saved messages file.
    14th November 2009 - 1.0.1
    • Bugfix to prevent error log messages from being generated.
    3rd January 2010 - 1.1
    • Fixed bulid script for easier recompile.
    • Added cvar sm_ca_showenhancedadmins to show seperate connect/disconnect messages to admins with the Generic Flag.
    • Added new section 'messages_admin' to data/cannounce_settings.txt to specify messages to use when sm_ca_showenhancedadmins is set. This new section will be created automatically when upgrading (after plugin load).
    11th July 2010 - 1.2
    14th July 2010 - 1.3
    • IMPORTANT UPGRADE NOTICE: Translation file added, 'translations/cannounce.phrases.txt' needs to be placed in 'sourcemod/translations' in your addons dir.
    • Fixed issue with Geoipcity support
    • Added detection of local network for geoip (thanks to Darkthrone - https://forums.alliedmods.net/member.php?u=54636)
    • Added translation file and translation messages for Local Network country. If you connect from a local IP you can set what is displayed in the {PLAYERCOUNTRY} and {PLAYERCOUNTRYSHORT} placeholders.
    22nd October 2011 - 1.4
    • IMPORTANT UPGRADE NOTE: After updating and loading this version your MUST delete the file 'cfg/sourcemod/cannounce.cfg'. If you have customized this file, check for non default settings and edit the file after installing the plugin.
    • Added placeholder color {OLIVE}
    • Sounds for 'sm_ca_playsoundfile' and 'sm_ca_playdiscsoundfile' are now added to the download table on map start.
    • Begun new testing versioning method to allow for 3rd party testing of plugins.
    • Renamed cvar sm_mapstartnosound to sm_ca_mapstartnosound
    • Added new cvar sm_ca_disableclientmsgchange which can prevent ALL clients from setting their own custom join message when using the sm_joinmsg command
    • Fix for connect/disconnect carriage return issue thanks to sipster19 - https://forums.alliedmods.net/showth...29#post1554329
    24th August 2012 - 1.5
    14th November 2012 - 1.6
    • IMPORTANT UPGRADE NOTE: Update the translation file 'addons/sourcemod/translations/cannounce.phrases.txt'
    • Added Dont Fear The Reaper's code for GeoIPCity SM Extension (http://forums.alliedmods.net/showthread.php?t=132470). Will fall back to built in GeoIP support if extension not installed.
    • Added the following message placeholder constants {PLAYERCOUNTRYSHORT3}, {PLAYERREGION}, {PLAYERCITY}
    • Added more translation support (again thanks to Dont Fear The Reaper's code)
    11th March 2016 - 1.7
    • Compiled with sourcemod 1.7.3
    • Updated deprecated function GetClientAuthString to GetClientAuthId
    • Changed suppress event from player_connect to player_connect_client, will not supress if game does not support this event
    • Added Multi Colors by Bara and removed my own color handling. This includes color support from:
      * Colors
      * More Colors
      and will allow different color usage based on the game engine being ran. Please see those threads for available colors.
    • Thanks to the following people for testing this in various different games, i really appreciate the support!:
      * HvG Community
      * HSFighter
      * Merudo
    13th February 2017 - 1.8
    • Added check to allow player_connect event to still fire to support older games; reported by Voodoo Priest
    Attached Files
    File Type: zip cannounce_1.8.zip (52.3 KB, 2319 views)
    __________________

    Last edited by Arg!; 02-12-2017 at 21:39. Reason: 1.8!
    Arg! is offline
    flubber
    Senior Member
    Join Date: Oct 2007
    Old 09-10-2008 , 09:48   Re: Connect Announce
    Reply With Quote #2

    That's great! Is there a way to disable the country information?
    flubber is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 09-10-2008 , 10:11   Re: Connect Announce
    Reply With Quote #3

    how did i not see that one comming! ill check it out tomorrow.
    __________________
    Arg! is offline
    flubber
    Senior Member
    Join Date: Oct 2007
    Old 09-10-2008 , 10:17   Re: Connect Announce
    Reply With Quote #4

    , thanx in fact i think just displaying the custom message would be great.
    Or maybe make a translation file to customize the "xxx connected : custom msg"
    flubber is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 09-10-2008 , 17:39   Re: Connect Announce
    Reply With Quote #5

    So is there a way to make some commands work for people with the a flag like having donators with the a flag being able to set their own custom message?
    __________________

    DontWannaName is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Old 09-10-2008 , 18:06   Re: Connect Announce
    Reply With Quote #6

    How is this different from CD Announcer? Also you messed up your public cvar in the topic.
    __________________
    DJ Tsunami is offline
    RAAP
    Member
    Join Date: Jan 2008
    Location: Vancouver, BC, Canada
    Old 09-10-2008 , 19:52   Re: Connect Announce
    Reply With Quote #7

    It would be cool if when you grant enhanced msg privledge to a player ingame (through menu), a msg displays on thier screen saying "type sm_joinmsg in console to set your custom message!"
    RAAP is offline
    Crap
    Senior Member
    Join Date: Aug 2008
    Old 09-10-2008 , 20:13   Re: Connect Announce
    Reply With Quote #8

    Quote:
    Originally Posted by DJ Tsunami View Post
    How is this different from CD Announcer? Also you messed up your public cvar in the topic.

    Allows for custom join messages eg, players can set a message that will display every time they connect to the server. This is not open to all players as they have to be allowed by an admin prior to setting their message. Menu integration included for allowing/disallowing custom join messages.
    Crap is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 09-10-2008 , 20:28   Re: Connect Announce
    Reply With Quote #9

    Ya Tsunami jeez, read the documentation noob...
    __________________

    DontWannaName is offline
    Arg!
    Veteran Member
    Join Date: Jul 2008
    Location: Australia
    Old 09-10-2008 , 21:16   Re: Connect Announce
    Reply With Quote #10

    Quote:
    Originally Posted by DontWannaName View Post
    So is there a way to make some commands work for people with the a flag like having donators with the a flag being able to set their own custom message?
    Simply allow the relevant players/steam id's to have a custom join message.
    __________________
    Arg! is offline
    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 10:06.


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