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

Connect Announce


Post New Thread Reply   
 
Thread Tools Display Modes
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 11-11-2011 , 09:37   Re: Connect Announce
Reply With Quote #601

Wow thats a bit random, accidental debug code i imagine. thanks for letting us know!
__________________
Arg! is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-11-2011 , 18:45   Re: Connect Announce
Reply With Quote #602

Here's the sources to my additions (including the two minor typos/bugs fixed which i mentioned earlier and) including the changed translation file as well as an example for the cannounce_settings.txt which is how a newly generated default would look like then.

I hope you'll find something useful in there .
Attached Files
File Type: zip cannounce1.4 (modified files).zip (8.2 KB, 310 views)

Last edited by Dont Fear The Reaper; 11-11-2011 at 22:39.
Dont Fear The Reaper is offline
trinityforge
Junior Member
Join Date: Nov 2011
Location: Norwich, England
Old 11-24-2011 , 20:16   Re: Connect Announce
Reply With Quote #603

Quote:
Originally Posted by flubber View Post
, 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"
you were too busy making a fantastic mod!
trinityforge is offline
Ryan_Hemsley18
Junior Member
Join Date: Sep 2011
Location: Sydney, Australia
Old 11-29-2011 , 09:16   Re: Connect Announce
Reply With Quote #604

Hi,

Can someone please help me?

When I join TF2 it comes up as this.


Aust Gaming Servers |Staff <> connected from country Australia (AU

I need it like this when an Admin Joins

Admin Aust Gaming Servers |Staff connected from country Australia (AU)

As for my Clan Member

It says this
[GA]The Joker <> connected from country Australia (AU

I want it to say this Player [GA]The Joker <> connected from country Australia (AU



"CountryShow"
{
"messages"
{
"playerjoin" "{GREEN}{PLAYERNAME} {DEFAULT}<{LIGHTGREEN}{DEFAULT}> connected from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DE FAULT}"
"playerdisc" "{GREEN}{PLAYERNAME} {DEFAULT}<{LIGHTGREEN}{DEFAULT}> from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DE FAULT}){GREEN} reason: {DEFAULT}{DISC_REASON}"
}
"messages_admin"
{
"playerjoin" "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<{LIGHTGREEN}{DEFAULT}> connected from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DE FAULT}
"playerdisc" "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<{LIGHTGREEN}{DEFAULT}> from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DE FAULT}{GREEN} reason: {DEFAULT}{DISC_REASON}"
}
}
__________________
Yours Sincerely,

[GA] Metal of Steel
Creator and Developer
www.gamingaustralia-clan.com
Ryan_Hemsley18 is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-29-2011 , 12:55   Re: Connect Announce
Reply With Quote #605

If you want to show "Admin" / "Player" for everyone on connect / disconnect you should add {PLAYERTYPE} in the "messages" section too. {PLAYERTYPE} is the placeholder for "Admin" / "Player". But for the {PLAYERTYPE} placeholder to work "sm_ca_connectdisplaytype" needs to be set to "1" (which it is by default). If you only want admins to see it, you need to set "sm_ca_showenhancedadmins" to "1" (it's "0" by default). In the "messages_admin" section the {PLAYERTYPE} placeholder is already added, so you wouldn't need to change that in this case.

Or to be a bit more precise:

- If "sm_ca_showenhancedadmins" is set to "0": Everyone will see the message format defined in the "messages" section (default behaviour).

- If "sm_ca_showenhancedadmins" is set to "1": Admins will see the "messages_admin" formatting and non-admins will see the "messages" formatting.


For what is this in your config:

{DEFAULT}<{LIGHTGREEN}{DEFAULT}>

And you probably forgot a ")" at the end of your connect message in the config.

Btw, you can also use colors in posts, would make it easier to see what you want your messages to look like exactly. And to post your cvars aswell could be helpful too. I hope this helps you already though.


Here's an example based on your config (assuming "sm_ca_connectdisplaytype" is set to "1" for {PLAYERTYPE} to work):

Note that admins will see the same messages as non-admins regardless of the cvar settings since "messages" and "messages_admin" are the same here.

Code:
"CountryShow"
{
    "messages"
    {
        "playerjoin"        "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<> connected from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DEFAULT})"
        "playerdisc"        "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<> from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DEFAULT}) {GREEN}reason: {DEFAULT}{DISC_REASON}"
    }
    "messages_admin"
    {
        "playerjoin"        "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<> connected from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DEFAULT})"
        "playerdisc"        "{PLAYERTYPE} {GREEN}{PLAYERNAME} {DEFAULT}<> from country {GREEN}{PLAYERCOUNTRY} {DEFAULT}({LIGHTGREEN}{PLAYERCOUNTRYSHORT}{DEFAULT}) {GREEN}reason: {DEFAULT}{DISC_REASON}"
    }
}

Last edited by Dont Fear The Reaper; 11-30-2011 at 13:52. Reason: added example
Dont Fear The Reaper is offline
Ryan_Hemsley18
Junior Member
Join Date: Sep 2011
Location: Sydney, Australia
Old 11-29-2011 , 21:00   Re: Connect Announce
Reply With Quote #606

This is what I have in my server.cfg


//Announces
sm_ca_connectdisplaytype - 1 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 - shows the enhanced player connect message from this plugin.
sm_ca_showenhanceddisc 1 shows the enhanced player disconnect message from this plugin.
sm_ca_showstandard 1 - shows the standard player connect message.
sm_ca_showstandarddisc 1 - 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 - allows admins with the kick flag to always be able to set a custom join message.
sm_ca_playsound 1 - 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 - 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
__________________
Yours Sincerely,

[GA] Metal of Steel
Creator and Developer
www.gamingaustralia-clan.com
Ryan_Hemsley18 is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-30-2011 , 10:46   Re: Connect Announce
Reply With Quote #607

This plugin creates its own config file in ".../cfg/sourcemod/cannounce.cfg", so you shouldn't add the same cvars to the server.cfg, better tweak them in the autocreated config of the plugin.

Or if you want to set them in the server.cfg for some reason, then you should comment out or delete all lines of the autocreated config (".../cfg/sourcemod/cannounce.cfg") to prevent conflicts. And if what you posted is exactly how it looks like in your server.cfg, better change it to something like this:

Code:
//Announces
sm_ca_connectdisplaytype "1"    //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 "0"    //prevent ALL clients from setting their own custom join message.
sm_ca_showenhanced "1"    //shows the enhanced player connect message from this plugin.
sm_ca_showenhanceddisc "1"    //shows the enhanced player disconnect message from this plugin.
sm_ca_showstandard "1"    //shows the standard player connect message.
sm_ca_showstandarddisc "1"    //shows the standard player disconnect message.
sm_ca_showenhancedadmins "0"    //shows a different enhanced connect/disconnect message to admins with the generic flag. 
sm_ca_playsoundfile "ambient\alarms\klaxon1.wav"    //specifies sound file to play if sm_ca_playsound is enabled
(...)
or without comments just:

Code:
//Announces
sm_ca_connectdisplaytype "1"
sm_ca_disableclientmsgchange "0"
sm_ca_showenhanced "1"
sm_ca_showenhanceddisc "1"
sm_ca_showstandard "1"
sm_ca_showstandarddisc "1"
sm_ca_showenhancedadmins "0"
sm_ca_playsoundfile "ambient\alarms\klaxon1.wav"
(...)
You should only set the cvars for which you want to use different values than the default value.

Last edited by Dont Fear The Reaper; 11-30-2011 at 11:43.
Dont Fear The Reaper is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 11-30-2011 , 13:26   Re: Connect Announce
Reply With Quote #608

In case someone wanna try and test my modified version, i posted a .zip containing all files including the compiled plugin in the GeoIPCity extension thread over here:

http://forums.alliedmods.net/showpos...3&postcount=47
Dont Fear The Reaper is offline
Dont Fear The Reaper
Member
Join Date: Nov 2011
Old 12-04-2011 , 23:44   Re: Connect Announce
Reply With Quote #609

To mentor's question (http://forums.alliedmods.net/showpos...2&postcount=50):

The problem with sipster19's addition is that it will only work for a certain layout which you mentioned in your post, but if you have a different layout like "Player has connected from CITY/REGION in COUNTRY" and a city or region record isn't found then it wouldn't work because it has no comma in it.

A possible solution for that would be to add a second connect/disconnect layout option if it doesn't find records for city or region. Means if one of those is not found, it will display a different message only allowing country and countrycode like "Player has connected from COUNTRY". It can happen that it finds a city, but no region or vice versa though and with that approach you couldn't use both even if it finds one of them.

I'd advice you to maybe try different layouts first, something similiar like i mentioned above or you can also edit the translation file to show something different than "an Unknown Region".

I'll try think about another solution for that or if you got one let me know. I wouldn't really want to integrate a rule which only applies to one certain layout and maybe even causes unwanted effects for other layouts.

Last edited by Dont Fear The Reaper; 12-04-2011 at 23:55.
Dont Fear The Reaper is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 01-11-2012 , 01:12   Re: Connect Announce
Reply With Quote #610

Quote:
Originally Posted by Arg! View Post
Pythong - i dont have access to a sql admins setup to develop this on. I guess you could keep the key/value file on your pc, edit it manually instead of using the commands, then write a script to push it to your servers. A bit fiddly i know but its all i can think of with its current format. Unless theres a mechanisim to replicate the file across servers on the server side?

Cooltad - this plugin doesnt do this, but its very creepy as i thought only yesterday that i should implement this.
mysql support would be nice. Like this other plugin but with your features. http://forums.alliedmods.net/showthread.php?p=1591313

Otherwise, if we could share a single config file against 5 servers, maybe by setting the location the same for every server so they all reference one config file. This would only work for servers on the same box though.
__________________

DontWannaName is offline
Reply



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 01:28.


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