Timeleft Hostname
5 Attachment(s)
Timeleft Hostname
Hell Phoenix http://www.charliemaurice.com/plugins Description: This is a port of Cheap_Suit's amxx plugin to sourcemod. It grabs the timeleft for the map, and puts it into the hostname so people can see how much time is left on the current map. Note that because of how the source engine works, this doesnt work until someone joins the server. Thanks To: Cheap Suit - for the original plugin Ferret for pointing out some things to fix =D Versions: 1.0 * First Public Release! 1.1 * Added missing mapend timer kill 1.2 * Fixed errors in the console 1.3 * Fixed frequency cvar not doing anything if set Cvars: sm_timeleft_hostname_frequency 2.0 - How often in seconds to update the hostname with timeleft ****You MUST set this in a config such as sourcemod.cfg or server.cfg...it cannot be changed "on the fly" Make sure you are using at least 1474 of sourcemod! |
Re: Timeleft Hostname
Not really an issue at all but!
Code:
GetMapTimeLeft(timeleft); Code:
if (!GetMapTimeLeft(timeleft) && timeleft <= 0) |
Re: Timeleft Hostname
Also, you need to kill the timer OnMapEnd... Your current setup will continuously recreate the timer OnMapStart without ever stopping the original timer.
|
Re: Timeleft Hostname
I thought all plugins are unloaded at map change?
I tried changing the getmaptimeleft, but it gave me some undesirable effects. Its a good idea though, I will try and see why it is acting weird (it gave me a timeleft of something weird when it shouldnt have even run yet because nobody had joined the server). Thanks! |
Re: Timeleft Hostname
Plugins are unloaded at map change in AMXX.
In SM, they are only unloaded if they are told to, or if they change. (This means your globals are also persistant across map changes, fyi) |
Re: Timeleft Hostname
Gotcha. Thanks for the info =D
|
Re: Timeleft Hostname
Updated to 1.1 to fix the mapend timer kill =D
|
Re: Timeleft Hostname
This is a great plugin. I have added commands to my supermenu extensions when certain game modes are launched (GunGame, Zombie Mode, DeathMatch, etc) that changes the hostname to inform joining players we're running a game vs normal pub play.
Is it possible to recode this as a hostname manager and include the current time left on a map, AND the current mode of play? It could key off the reg names of the popular game modes: GunGame, RPG:Mod, CSSDM, Zombie Mod, etc - with a variable front name cvar in a config file: The hostname would always be: XYZ Clan Server - Variable Game Mode 1 - Time Remaining 12min Or something similar. |
Re: Timeleft Hostname
Possibly, would have to look into it. I dont know where those values are stored since I dont run a CS server.
|
Re: Timeleft Hostname
Nice plugin. One problem. Without plugin and standard ones in the sm package on empty server cpu is 0.00 with this plugin on empty server it jumps to 8.90 - 11.0. This is on a dedicated server.
Maybe have a cvar to limit the amount it reports that can be set. every 30 seconds or every minute etc. |
All times are GMT -4. The time now is 12:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.