Half-Life и Adrenaline Gamer форум http://aghl.ru/forum/ |
|
HLSDK (client) PlaySound http://aghl.ru/forum/viewtopic.php?f=20&t=2550 |
Страница 1 из 1 |
Автор: | Gennaro-HL [ 14 сен 2016, 02:10 ] |
Заголовок сообщения: | HLSDK (client) PlaySound |
as I can do to make the PlaySound does not repeat what I want is to be played once how can I do? Код: int CHudTest::Draw(float flTime) |
Автор: | Lev [ 14 сен 2016, 06:40 ] |
Заголовок сообщения: | Re: HLSDK (client) PlaySound |
Use a global variable or a field Код: bool g_bPlayOnce = false;Sure, this sample is logically wrong, but it should give you the idea. You just need to set/reset this field at the right moment. |
Автор: | Gennaro-HL [ 15 сен 2016, 01:48 ] |
Заголовок сообщения: | Re: HLSDK (client) PlaySound |
thanks another question as I can do to play with an interval of 1 second Код: //I was doing testing with m_flTime but I have no success |
Автор: | Lev [ 15 сен 2016, 03:34 ] |
Заголовок сообщения: | Re: HLSDK (client) PlaySound |
You can use gHUD.m_flTime, but keep in mind that it ticks only when you are in game and not in the console. I.e. HUD needs to be drawn for this to get correct value. |
Автор: | Gennaro-HL [ 16 сен 2016, 12:33 ] |
Заголовок сообщения: | Re: HLSDK (client) PlaySound |
Because only when you start playing the map I am doing something wrong? Код: TimeMatch = gHUD.m_flTime - m_Test; |
Страница 1 из 1 | Часовой пояс: UTC + 5 часов [ Летнее время ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |