View Single Post
Author Message
Antithasys
Moderator
Join Date: Apr 2008
Old 10-14-2008 , 17:40   Simple AllTalk Manager
Reply With Quote #1

Simple AllTalk Manager

Description

Allows you to set alltalk at different times.
Plugin is part of the Simple Plugins project.

Features
  • Allows you to set AllTalk at different times during the rounds.
  • Ability to have a player threshold
  • Ability to customize event hooks

Cvars
  • satm_enabled - Enable or Disable AllTalk Manager
  • satm_threshold_enabled - Enables/Disables player threshold
  • satm_player_threshold - Amount of players for the threshold
  • satm_threshold_setting - Enables/Disables AllTalk up to player threshold, with the opposite set after the threshold
  • satm_logactivity- Enables/Disables log activity
Installation

Place the simple-alltalkmanager.smx in the /sourcemod/plugins dir.
Place the simple-alltalkmanager_events.cfg in the /sourcemod/configs dir.

A .cfg file will be made when first ran. It will be located in /cfgs/sourcemod
If you have a old version of this plugin, delete the config file and let it make a new one. Then change the settings.

Change Log
Quote:
(27/09/09): Version 1.3.0
-----------------------
+ Added support for custom events via .cfg file
+ Added join message to display current alltalk status
- Removed event cvars in lieu of .cfg file
! Fixed threshold setting overriding event setting
! Fixed non-attack/defend maps not calling teamplay_setup_finished event. This effectively means you can now have alltalk on during the setup round and not have it break if there is no setup round. (TF2 only)
Features/Bugs:
Please use the project site to report all bugs and request additional features.

Future Updates

None.

Notes

The way this works now is with a config file called simple-alltalkmanager_events.cfg. This file is a kvfile that has all the events you wish to hook, the reason string, and the setting. I included an example file for TF2, but you can customize it to your desired events and settings.

Here is an example of the structure:
Code:
"game_events"
{
	"event_name"
	{
		"reason"	"Some Reason"
		"setting"	"1"
	}
}
An example of this for the event round start in TF2 would be:
Code:
"game_events"
{
	"teamplay_round_start"
	{
		"reason"	"Round Start"
		"setting"	"1"
	}
}
The reason string is what is printed to the players when alltalk is changed because of the event. A list of the known game events is at the wiki here. Note that not all the events listed will actually fire, but if they do fire, they will in the order that is listed there.

To better explain how this plugin actually works, lets use an example based upon the _events.cfg file supplied with the plugin and the plugin's default settings.
  1. Dustbowl map loads
  2. More than eight players join the server, alltalk is turned OFF
  3. teamplay_round_start fires and alltalk is turned ON (attack/defend map)
  4. teamplay_setup_finished fires and alltalk is turned OFF (attack/defend map)
  5. teamplay_round_win fires and alltalk is turned ON
  6. teamplay_round_start fires and alltalk is turned ON (attack/defend map)
  7. teamplay_setup_finished fires and alltalk is turned OFF (attack/defend map)
  8. Players leave server and there are now less than eight players alltalk is turned ON
  9. teamplay_round_win fires and alltalk is left ON
  10. teamplay_round_start fires and alltalk is left ON (attack/defend map)
  11. teamplay_setup_finished fires and alltalk is left ON (attack/defend map)
  12. More than eight players join the server, alltalk is turned OFF
  13. teamplay_round_win fires and alltalk is turned ON
  14. 2Fort map loads
  15. More than eight players join the server, alltalk is turned OFF
  16. teamplay_round_start fires and alltalk is turned OFF (NOT an attack/defend map)
    If you have the teamplay_setup_finished event in the config file, it will take this setting on a non-attack/defend map since there is no setup period (only in TF2)
  17. teamplay_suddendeath_begin fires and alltalk is turned ON
  18. teamplay_round_win fires and alltalk is left ON
  19. teamplay_round_start fires and alltalk is turned OFF (NOT an attack/defend map)
  20. Players leave server and there are now less than eight players alltalk is turned ON
    etc.

If you notice, the player threshold can override whatever event state the game is in. If the threshold says turn it on, it will turn on, regardless of the event state; however if the threshold says to turn it off, and the event state says it should be on, it will be on. Additionally, understanding the order of the events will ensure you have the right setting when the event fires.
Attached Files
File Type: zip Simple AllTalk Manager.zip (11.9 KB, 2755 views)
__________________
[my plugins]

When you think about asking a question... consider what have you tried?

Last edited by Antithasys; 12-30-2009 at 16:00. Reason: updated post
Antithasys is offline