TF2 RoundInfo
Description:
Gives information about the current round in Natives for other plugins to use.
Features:- Function to return time left in a round
- Function to return if a player switch occurred in cp and pl maps
Commands:- roundtime - Returns the amount of time left in a round
Console Variables:
None.
Installation:
Place the tf2roundinfo.smx in the
/sourcemod/plugins dir.
Place the tf2roundinfo.inc in the
/sourcemod/scripting/include dir.
Changelog:
Include File:
PHP Code:
/**
* This will get and store the time left in the round.
*
* @param roundtimeleft Interget to store the time remaining
* @return None.
*/
native TF2INFO_GetRoundTimeLeft(&roundtimeleft);
/**
* This will return true if a team switch was detected at the start of the
* current round. This will always return false on round end and should
* only be called on round start.
*
* @param None.
* @return True if a switch was detected, false if not.
*/
native bool:TF2INFO_DidTeamsSwitch();
Future Updates:
None.
Notes:
I was running into situations where I needed to know if the teams has been switched on cp and pl maps. Not to mention the time remaining in the round. I found it odd that neither of these natives were in sourcemod so I went ahead and created them in this plugin.
This plugin is really only useful to other plugins that need this information.
The example will not compile on the forums as is only meant to show you how to use it in your own code. You can compile it yourself if you want to see the example work and make sure you have it installed correctly.