[HELP] Set_Task question
So let's say we have this, is there any good way to execute a code in the burning_flame function every two seconds?
PHP Code:
|
Re: [HELP] Set_Task question
Use 2.0 instead of 0.2 as the first argument in set_task()? Your example is not good enough if that's not what you want, give us more info.
|
Re: [HELP] Set_Task question
Well, i want to do something like this
Without the need to set one more task PHP Code:
|
Re: [HELP] Set_Task question
well you can create a var that holds next burn sound time like:
Code:
new Float:g_flNextBurnSound[33]; |
Re: [HELP] Set_Task question
You can use a thinking entity, read this.
|
Re: [HELP] Set_Task question
any other ideea without the need of an array or thinking entities?
maybe with switch and cases? i know how to do it using a random num, but i want exactly at 2.0 seconds |
Re: [HELP] Set_Task question
Just use two tasks? Or just use what has been already suggested by others.
|
Re: [HELP] Set_Task question
Quote:
If you want something to execute every two seconds, set the time for your tast to 2.0 seconds. If you want it to be called immediately, in addition to the task, call the function directly before setting the task. |
Re: [HELP] Set_Task question
2/0.2 =10 so:
PHP Code:
|
Re: [HELP] Set_Task question
done, thanks, i tought there is a better method, but, i went with the array and counter
|
| All times are GMT -4. The time now is 09:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.