remove task with get_gametime
Ok, i really don't want to make another task that will remove another task and so on.
So here is the code PHP Code:
This pot should actually heal for the first 20 seconds after buying (100hp if you done the math), and then stop healing, and message should pop out, which i only put for testing... So how do i use get_gametime() correctly, and any advices about get_gametime() ?? I really appreciate your help, Thank You! :3 |
Re: remove task with get_gametime
You need to save the game time when the potion is bought for each player, then compare that with the current game time. Also, instead of removing the task, you should have a check if it has not been 20 seconds, and set the task there. (if -> set_task) instead of (set_task, if -> remove_task)
|
Re: remove task with get_gametime
I'm struggling and i can't seem to make it. I've been trying something like this:
PHP Code:
PHP Code:
And when i to do the check as you told me PHP Code:
I'm going to keep trying various combinations until someone answers back with a solution, or when i actually make it by myself Thanks guys :) :) :3 |
Re: remove task with get_gametime
Just use flag "a" (repeat) and set repeat time to 100 (or 99, i always forget which one) :
PHP Code:
|
Re: remove task with get_gametime
Ok thank you i will try it and answer back when i get back home :)
|
Re: remove task with get_gametime
Yep it works. But i will try to check if user is alive, if not i wont even open a menu so i won't have to check every time that in tasks.
And its 100, by the way :) Thank you Connor, have a nice day :) If i have any more questions about this mod I'm working on (which purpose is learning) I'll post here |
| All times are GMT -4. The time now is 16:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.