How to make a countdown in HUD [SOLVED]
Hello, my title is very descriptive so I'll be short.
I need to know how to make a HUD message which counts from an hour to 1 second |
Re: How to make a countdown in HUD
umm... the hud msg generator in studio?
|
Re: How to make a countdown in HUD
set_task(1.0,"count_down",1234567,"",0,"a",36 00)
public count_down() { } |
Re: How to make a countdown in HUD
oviously he's not asking how to make a hud message . He needs help making it count.
Code:
|
Re: How to make a countdown in HUD
Does this work?
Code:
|
Re: How to make a countdown in HUD
compile it & find out.
|
Re: How to make a countdown in HUD
There are some logic and general code flaws and you're a bit confused on what the task id is. I'd search around the forum for more info and also consult the funcwiki on the main page.
|
Re: How to make a countdown in HUD
I hope you're happy. You made my eyes bleed. :wink:
I would suggest searching the forums for other plugins that have a countdown and see how they did it. By the way, while you don't need so many set_task calls, it is acceptable to use 0 as each of their task ids in this context. This context being that you're not manually ending the tasks later. However, I'd suggest using _ instead of 0 when the task id isn't meaningful, such as how you're using it. The _ is used when you want to accept the default value for an argument. |
Re: How to make a countdown in HUD
I wanted to try my hand at this, since I'm relatively new to writing programs. I spent a while figuring out how to do the counter nicely.
The code below should work fine, though the hudmessage is untested. (I tested it with server_print.) Anyway, I'd really appreciate some feedback on this. If you can do this better, or more efficiently, please show me how. Code:
|
Re: How to make a countdown in HUD
http://forums.alliedmods.net/attachm...1&d=1160097414
I think this should answer your question a little, I made for a request some time ago. |
| All times are GMT -4. The time now is 06:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.