Raised This Month: $138 Target: $400
 34% 

[TF2] Possibilities to display our own countdown timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 09-30-2008 , 03:14   [TF2] Possibilities to display our own countdown timer
Reply With Quote #1

I want to display my own countdown timer to all players when they are ingame.

The following are the possiblities for this-
1. Display the reducing timer value in player chat messages at frequent intervals
2. Display the timer as center text at less frequent (compared to chat) intervals

Are there more options like displaying my own countdown clock or something which could override the countdown clock that is displayed by the game itself.

Ideas are welcome...
shubhishubhi is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 09-30-2008 , 06:59   Re: [TF2] Possibilities to display our own countdown timer
Reply With Quote #2

using print chat / center functions will flood server
If in TF2 you can draw hudmessages, it's good to use it in this case

example, but using PrintToChatAll() (not recommended)
Code:
new countdown = 30; public func() {     CreateTimer(1.0,func_display_countdown,_,TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } public Action:func_display_countdown(Handle:timer) {     if(countdown >= 0)         PrintToChatAll("%d",countdown);         else return Plugin_Stop;         countdown--;         return Plugin_Continue; }
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 09-30-2008 , 07:27   Re: [TF2] Possibilities to display our own countdown timer
Reply With Quote #3

Yes... just realized that I can also use PrintHintTextToAll()
shubhishubhi is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 10-02-2008 , 01:15   Re: [TF2] Possibilities to display our own countdown timer
Reply With Quote #4

I have been actually working on a plugin to track the round timers, and team switched "events", used in TF2.

I have been having difficulty with the team switch events, but think I got it worked out.

I am almost done, but the code is so extensive that I will really only be able to provide it as a include file. It should really be done as an extension, but since I am not a C++ guru, the plugin will have to do.

While this will not compile easily with the web based compiler, it, in the end, will actually provide you with an accurate(within 1 second) round timer in tf2, and accurately give you a bool for the team switched "events".
Antithasys 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:53.


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