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

[ANY] Favorite Connections: Messages (v1.1, 2015-12-23)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nanochip
Senior Member
Join Date: Jan 2014
Plugin ID:
4524
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Detects whenever a client connects via server favorites tab and sends messages to the user and/or everyone on the server.
Old 02-17-2015 , 21:25   [ANY] Favorite Connections: Messages (v1.1, 2015-12-23)
Reply With Quote #1

[ANY] Favorite Connections: Messages




Description:
This plugin detects whenever a player connects via server favorites tab and sends him/her custom messages. Furthermore, this plugin supports More Colors.

I am fully open to suggestions, so suggest away!

Dependencies:
CVARS:

Use %PLAYER_NAME% to include a player's name in the message.
For a list of all usable colors, go here
  • favoriteconnections_messages_version - Plugin version, no touchy!
  • favoriteconnections_messages_enable [1/0] - (Default = 1) Enable = 1 Disable = 0
  • favoriteconnections_messages_broadcastmode [0/1/2/3] - (Default = 1) Broadcast a message to everyone on the server that a player joined through favorites (Does not show for the user who joined through favorites).
    0 = Don't broadcast any messages
    1 = Broadcast the message to the chat only
    2 = Broadcast the message to the center of the screen only
    3 = Broadcast the message to both chat and center of the screen
  • favoriteconnections_messages_broadcastchat "" - (Default = "{green}%PLAYER_NAME% {orange}joined the server through his/her {blue}favorites{orange}!") The broadcast message that gets sent to the chat (Supports colors).
  • favoriteconnections_messages_broadcastcenter "" - (Default = "%PLAYER_NAME% joined the server through his/her favorites!") The broadcast message that gets sent to the center of the screen (Doesn't support colors).
  • favoriteconnections_messages_notifymode [0/1/2/3] - (Default = 1) Send the user who joined through favorites a message when they are fully in game. (Only displays to the user who joined via favs).
    0 = Don't send any messages
    1 = Send the message to the chat only
    2 = Send the message to the center of the screen only
    3 = Send the message to both chat and center of the screen
  • favoriteconnections_messages_notifychat "" - (Default = "{orange}Thank you, {green}%PLAYER_NAME%{orange}, for adding us to your favorites!") Send a message to the player's chat who joined thru favs (Supports colors).
  • favoriteconnections_messages_notifycenter "" - (Default = "Thank you, %PLAYER_NAME%, for adding us to your favorites!") Send a message to the center of the screen of the player who joined thru favs (Doesn't support colors).
  • favoriteconnections_messages_firsttimeonly [0/1] - (Default = 1) Only announce the first time the player joins thru favorites 1 = Yes, 0 = No.

Also Check Out:
Installation:
  1. Download favoriteconnections.smx and place it in the (game)/addons/sourcemod/plugins/ folder.
  2. Install More Colors.
  3. Download the favoriteconnections_messages.smx attached below (Get Plugin doesn't work) and install it to your (game)/addons/sourcemod/plugins/ folder.
  4. Restart your server, or reload the map.

To-Do List:
  • (None yet)

Changelog:
Spoiler


Want to support me?
  • Leave some feedback of this plugin and/or a suggestion.
Attached Files
File Type: smx favoriteconnections_messages.smx (12.0 KB, 440 views)
File Type: sp Get Plugin or Get Source (favoriteconnections_messages.sp - 426 views - 5.3 KB)
__________________

Last edited by Nanochip; 12-24-2015 at 01:09.
Nanochip is offline
Vastrix
Senior Member
Join Date: Aug 2012
Location: Zion
Old 07-16-2015 , 09:37   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #2

waw a plugin from 2015 \o/ (these are starting to get rare)

Great idea, love it, Very curious as to how exactly it knows that the favorite tab was used tho..(I'll be sure to check the source when i get into srcpwn ;)

Suggestion
I'd rather actually just have a list of players that connected through favorites
like:
  • /fclist Shows amount of players that have connected through favorites
    And maybe a more detailed list in a log file?
  • Also maybe when a player joins that connected through favorites, broadcast a msg to admins only?

Great idea, great plugin, love it, keep up the good work!

Last edited by Vastrix; 07-16-2015 at 09:39.
Vastrix is offline
Wolvan
Senior Member
Join Date: Jul 2014
Location: Tyrol, Austria
Old 07-16-2015 , 10:39   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #3

Quote:
Originally Posted by Vastrix View Post
waw a plugin from 2015 \o/ (these are starting to get rare)

Great idea, love it, Very curious as to how exactly it knows that the favorite tab was used tho..(I'll be sure to check the source when i get into srcpwn ;)

Suggestion
I'd rather actually just have a list of players that connected through favorites
like:
  • /fclist Shows amount of players that have connected through favorites
    And maybe a more detailed list in a log file?
  • Also maybe when a player joins that connected through favorites, broadcast a msg to admins only?

Great idea, great plugin, love it, keep up the good work!
You can easily do that yourself, this plugin is build on top of Favorite Connections, which is a rather easy to use system to detect people joining via favorites.
If you really want, I could try doing it for you someday
__________________
Wolvan is offline
Send a message via Skype™ to Wolvan
Vastrix
Senior Member
Join Date: Aug 2012
Location: Zion
Old 07-16-2015 , 11:36   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #4

Quote:
Originally Posted by Wolvan View Post
You can easily do that yourself, this plugin is build on top of Favorite Connections, which is a rather easy to use system to detect people joining via favorites.
If you really want, I could try doing it for you someday
Heh, well, knock yourself out ;)
I just think it'd be a cool idea and very useful addition/plugin

Thanks!
Vastrix is offline
Nanochip
Senior Member
Join Date: Jan 2014
Old 07-17-2015 , 15:27   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #5

Quote:
Originally Posted by Vastrix View Post
waw a plugin from 2015 \o/ (these are starting to get rare)

Great idea, love it, Very curious as to how exactly it knows that the favorite tab was used tho..(I'll be sure to check the source when i get into srcpwn ;)
cl_connectmethod is how. basically if cl_connectmethod equals serverbrowser_favorites, then the client connected to the server via favorites tab.

Quote:
Originally Posted by Vastrix View Post
Suggestion
I'd rather actually just have a list of players that connected through favorites
like:
  • /fclist Shows amount of players that have connected through favorites
    And maybe a more detailed list in a log file?
  • Also maybe when a player joins that connected through favorites, broadcast a msg to admins only?

Great idea, great plugin, love it, keep up the good work!
sure why not, i'll add those in the next update
__________________
Nanochip is offline
Vastrix
Senior Member
Join Date: Aug 2012
Location: Zion
Old 07-17-2015 , 15:29   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #6

Quote:
Originally Posted by Nanochip View Post
sure why not, i'll add those in the next update
Thanks!
Vastrix is offline
Wormy
Senior Member
Join Date: Jan 2013
Location: 2fort
Old 08-18-2015 , 10:46   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #7

I can't get it to work for some reason, there are no error logs and this is what FavoriteConnections_Messages.cfg looks like:

Code:
// This file was auto-generated by SourceMod (v1.7.3-dev+5225)
// ConVars for plugin "favoriteconnections_messages.smx"


// This is the center text that is sent to all playeres on the server about the player joining through favorites (Doesn't support colors).
// -
// Default: "%PLAYER_NAME% joined the server through his/her favorites!"
favoriteconnections_messages_broadcastcenter "%PLAYER_NAME% joined the server through his/her favorites!"

// This is the chat text that is sent to all players on the server about the player joining through favorites (Supports colors).
// -
// Default: "{green}%PLAYER_NAME% {orange}joined the server through his/her {blue}favorites{orange}!"
favoriteconnections_messages_broadcastchat "{green}%PLAYER_NAME% {orange}joined the server through his/her {blue}favorites{orange}!"

// How should we broadcast to all players on the server about the player joining through favorites? 0 = Do nothing 1 = Print to the chat 2 = Print to the center of the screen 3 = Both print to chat and center of the screen. (1 is the default)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "3.000000"
favoriteconnections_messages_broadcastmode "0"

// Enable the plugin? 1 = Enable, 0 = Disable
// -
// Default: "1"
favoriteconnections_messages_enable "1"

// This is the center text that is sent to only the player when he/she joins the game via favorites (Doesn't support colors).
// -
// Default: "Thank you, %PLAYER_NAME%, for adding us to your favorites!"
favoriteconnections_messages_notifycenter "Thank you, %PLAYER_NAME%, for adding us to your favorites!"

// This is the chat text that is sent to only the player when he/she joins the game via favorites (Supports colors).
// -
// Default: "{orange}Thank you, {green}%PLAYER_NAME%{orange}, for adding us to your favorites!"
favoriteconnections_messages_notifychat "{orange}Welcome back {green}%PLAYER_NAME%{orange}!"

// How should we notify the player who joined through favorites? 0 = Do nothing 1 = Print to the chat 2 = Print to the center of the screen 3 = Both print to chat and center of the screen. (1 is the default)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "3.000000"
favoriteconnections_messages_notifymode "1"
__________________
Wormy is offline
Nanochip
Senior Member
Join Date: Jan 2014
Old 08-19-2015 , 13:50   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #8

Make sure you have Favorite Connections installed.

Based on your config, only the person joining thru favorites will be able to see a message.

Note that this plugin only announces a player connected thru favorites when it's their first time doing so, and in order for it to acknowledge that is by checking if you're an admin. If you have admin flags, then it assumes you already have the server in your favorites and doesn't announce the message.
__________________
Nanochip is offline
Wormy
Senior Member
Join Date: Jan 2013
Location: 2fort
Old 08-19-2015 , 18:40   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #9

Oh, right, that would explain some things. Didn't catch the "for the first time" part, my bad.
__________________
Wormy is offline
Hefal
Senior Member
Join Date: Jul 2015
Old 12-22-2015 , 23:52   Re: [ANY] Favorite Connections: Messages (v1.0, 2015-2-17)
Reply With Quote #10

Quote:
Originally Posted by Nanochip View Post
Make sure you have Favorite Connections installed.

Based on your config, only the person joining thru favorites will be able to see a message.

Note that this plugin only announces a player connected thru favorites when it's their first time doing so, and in order for it to acknowledge that is by checking if you're an admin. If you have admin flags, then it assumes you already have the server in your favorites and doesn't announce the message.
I was just about to shout. ITS NOT WORKING. HALP. But alrighty, that explains it.
Quick question tho. what do I change/remove from the code if I'd like it to announce every time someone connects via favorites both to the server and the client? Would be nice to see cvar's for this in upcoming versions!

Thanks nano and great plugins
Hefal 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 19:34.


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