Emit Sound with Timer
Hello where is my mistake ?
PHP Code:
|
Re: Emit Sound with Timer
Try this. SecondsBetweenSounds is the delay in seconds before the sound can be played again.
PHP Code:
|
Re: Emit Sound with Timer
This doen't work
|
Re: Emit Sound with Timer
Explain better what you are trying to do, I was making assumptions with this.
A topic titled "Emit sound with timer" and "Hello where is my mistake ?" doesnt give much guidance. One thing you can try with your code is declare b_StopSound[32] as global, and you need to size it 33 not 32. So at the top of all of your code, under the includes, put new bool:b_StopSound[33]. It is false by default so you do not need = false. Remove static b_StopSound[32] from the damage forward. Add client_disconnect( id ) and use remove_task( id ) and b_StopSound[ id ] = false there. SoundOff[client] = false has no effect to the variable you declared in the damage event. This only works when the variable is passed by reference, which it is not when passed with set_task(). |
Re: Emit Sound with Timer
More precisely, it works, but sometimes the sound is not played to the end (disappear). Maybe the fact CHAN_ *?
|
Re: Emit Sound with Timer
Your method it's work, but why sound somites dissapear
P.S. When in Half-Life fire at Zombie him Pain sound play norm |
Re: Emit Sound with Timer
I have been using set_task with ID as a client for a different purpose, which then set the ID of the set_task?
May be ? PHP Code:
|
Re: Emit Sound with Timer
Its good if you are using set_task() for multiple things. If you use 'id' only, then you cannot tell which task is for what purpose. Just remember to subtract TASKID_STOP_SPAM from the Time_SoundStopSpam function.
|
| All times are GMT -4. The time now is 09:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.