Countdown
PHP Code:
PHP Code:
|
Re: Countdown
no. remove_task will cut out that task and delete its hook from execution. From what i see....it should do what you wish it to.
|
Re: Countdown
No no, this part works perfectly, i'm just curious about "time" values.
I'm willing to stop the damage when one of tasks like this is active using PHP Code:
PHP Code:
PHP Code:
As far as you said variable TIME stops @ 0 or -1 ( not sure ) and stays with it for good. |
Re: Countdown
The number of lines of code is -usually- irrelevant to the run time of the code. Its HOW the code is run and written. Just FYI
As for your two pieces of code i'd say the second one is better because you don't need to do more than one check (flag, and task_exists) and it checks to make sure you have time left, rather than calling the native to see if the task is alive. Either way....return HAM_SUPERCEED will not stop damage from being delt (i don't think) you should use SetHamParamFloat(3, 0.0) to deal 0 damage. |
Re: Countdown
Could do something like this
PHP Code:
|
Re: Countdown
Quote:
PHP Code:
|
Re: Countdown
Code:
public hook_TakeDamage(victim, attacker, useless, Float:damage, damagebits) |
Re: Countdown
Ok, but you didn't respond to my statement above.
And I was just giving him one option, it seemed as if he had the time method already figured out. |
Re: Countdown
If i'm FORCED to use that method...there is no way. I was just saying that the task identifier would be built into the enum.
|
Re: Countdown
Quote:
Quote:
PHP Code:
Quote:
|
| All times are GMT -4. The time now is 15:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.