Half-Life и Adrenaline Gamer форум http://aghl.ru/forum/ |
|
[HELP] CountDown speed ! http://aghl.ru/forum/viewtopic.php?f=12&t=2421 |
Страница 1 из 1 |
Автор: | abdobiskra [ 01 апр 2016, 18:46 ] |
Заголовок сообщения: | [HELP] CountDown speed ! |
Hello I'm having a problem in the countdown when using this function numbers go down very quickly is there a problem ? Код: public count(id) |
Автор: | Lev [ 01 апр 2016, 20:09 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
Check all set_task's in your plugin that they are using different "id"'s for different tasks. |
Автор: | abdobiskra [ 02 апр 2016, 18:29 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
Yeah ! Now I want to stop time, what should I do for it? Код: new g_HudSyncObj |
Автор: | Kuma77 [ 02 апр 2016, 18:42 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
if you want stop timer at 0 just catch the counter when its 0 sec and return PLUGIN_HANDLED, or reset task to 0.0 . just like this Код: if (count[id] == 0) btw , use other method to count your time !!!!! |
Автор: | abdobiskra [ 02 апр 2016, 19:07 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
Kuma77 remain the same problem? |
Автор: | Lev [ 02 апр 2016, 19:51 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
abdobiskra In your case to stop repeating the task just do bypass set_task. To stop already scheduled task you can use remove_task. Your logic is wrong here: Код: if (count[id] == 0)You should decrease first. Код: count[id]--Or something like that. Because in your current code after decreasing to zero you schedule task again and it sets counter to 10 because it is 0. |
Автор: | abdobiskra [ 02 апр 2016, 21:42 ] |
Заголовок сообщения: | Re: [HELP] CountDown speed ! |
Цитата: To stop already scheduled task you can use remove_task. Yeah i forget this |
Страница 1 из 1 | Часовой пояс: UTC + 5 часов [ Летнее время ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |