AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Timeleft in Hostname (https://forums.alliedmods.net/showthread.php?t=53653)

pizzahut 04-08-2007 09:41

Timeleft in Hostname
 
15 Attachment(s)
This plugin was requested.

Description: Adds the remaining time in h:m:s format to the host name (updated every second).

CVAR: amx_hostname_update - How often the hostname is updated, in seconds. (0 = disabled)
Note: Changing this cvar during the game won't take effect until map change.

Authors: Deviance (aka Doombringer) and me.

Credits: Original plugin "Timeleft Hostname" by Cheap_Suit. The plugin archive can be found here. The original thread (without the plugin) can be found here.

Note on pcvars: There's no pcvar function for setting strings, so I'm using the conventional way to set it.

anssik 04-08-2007 11:43

Re: Timeleft in Hostname
 
Nice lil plugin! :)

I think you should add:
Code:
public plugin_end() {     set_cvar_string("hostname", g_hostname);     return PLUGIN_HANDLED; }
Just as a fail-safe.

Brad 04-08-2007 11:52

Re: Timeleft in Hostname
 
I would suggest letting people set the time between updates with a CVAR.

pizzahut 04-08-2007 20:45

Re: Timeleft in Hostname
 
v1.2 Added plugin_end and cvar as suggested.
v1.2.1 Added a delay before the cvar is checked (for reading from amxx.cfg at server start).

datwinkle 04-09-2007 15:20

Re: Timeleft in Hostname
 
very useful :P
also, possibly adding a CVAR that will allow someone to tell the player if they would put the timeleft infront or behind the hostname.

amx_timeleft_organize - 1 for front, 2 for behind

Example: DaTwinkle House | Time Remaining: 1h20m2s
Example 2: Time Remaining: 1h20m2s | DaTwinkle House

pizzahut 04-09-2007 17:14

Re: Timeleft in Hostname
 
I don't think people would want the time left in front. Thanks for the suggestion though.

bmann_420 04-10-2007 14:57

Re: Timeleft in Hostname
 
Somebody has made this before, a long time ago. I have used it, although I did not see much use for it myself. It was a nice job. I'll see if I can find it and show yea, if not good Job :up:

EDIT:
Here (Sorry it was only the Team Scores, not the time. :D

Cold Rub 04-12-2007 10:48

Re: Timeleft in Hostname
 
this plugin keeps changing the name of my server to "half-life"

pizzahut 04-12-2007 11:51

Re: Timeleft in Hostname
 
I found another possible issue - the timer wasn't stopped at the end.
(Plugin updated.)

Cold Rub 04-12-2007 12:56

Re: Timeleft in Hostname
 
Quote:

Originally Posted by pizzahut (Post 463919)
I found another possible issue - the timer wasn't stopped at the end.
(Plugin updated.)

and???? this will do what as far as the name being changed?


All times are GMT -4. The time now is 13:06.

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