Raised This Month: $95 Target: $400
 23% 

Timeleft in Hostname


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   Hawk552 (427)
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-08-2007 , 10:41   Timeleft in Hostname
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (hostname_timeleft.sma - 4716 views - 2.8 KB)
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-20-2007 at 05:57. Reason: Update to v1.3.6
pizzahut is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 04-08-2007 , 12:43   Re: Timeleft in Hostname
Reply With Quote #2

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.
__________________
anssik is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-08-2007 , 12:52   Re: Timeleft in Hostname
Reply With Quote #3

I would suggest letting people set the time between updates with a CVAR.
__________________
Brad is offline
Old 04-08-2007, 18:54
pizzahut
This message has been deleted by pizzahut. Reason: Merging
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-08-2007 , 21:45   Re: Timeleft in Hostname
Reply With Quote #4

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).
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-08-2007 at 22:25.
pizzahut is offline
datwinkle
BANNED
Join Date: May 2006
Location: Virginia
Old 04-09-2007 , 16:20   Re: Timeleft in Hostname
Reply With Quote #5

very useful
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
datwinkle is offline
Send a message via AIM to datwinkle
Old 04-09-2007, 18:05
pizzahut
This message has been deleted by pizzahut. Reason: nm
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-09-2007 , 18:14   Re: Timeleft in Hostname
Reply With Quote #6

I don't think people would want the time left in front. Thanks for the suggestion though.
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.
pizzahut is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 04-10-2007 , 15:57   Re: Timeleft in Hostname
Reply With Quote #7

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

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

Last edited by bmann_420; 04-10-2007 at 16:00.
bmann_420 is offline
Cold Rub
BANNED
Join Date: Mar 2007
Location: Long Beach, NY
Old 04-12-2007 , 11:48   Re: Timeleft in Hostname
Reply With Quote #8

this plugin keeps changing the name of my server to "half-life"
Cold Rub is offline
Old 04-12-2007, 12:32
pizzahut
This message has been deleted by pizzahut. Reason: Another bug. :(
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-12-2007 , 12:51   Re: Timeleft in Hostname
Reply With Quote #9

I found another possible issue - the timer wasn't stopped at the end.
(Plugin updated.)
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-12-2007 at 12:56.
pizzahut is offline
Cold Rub
BANNED
Join Date: Mar 2007
Location: Long Beach, NY
Old 04-12-2007 , 13:56   Re: Timeleft in Hostname
Reply With Quote #10

Quote:
Originally Posted by pizzahut View Post
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?
Cold Rub is offline
Reply


Thread Tools
Display Modes

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 14:20.


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