Stop set_task if menu doesn't exist.
I would like to remake that code below (it makes the menu shutdown after 10 seconds if it's called) not to turn of after 10 seconds if the menu is already closed...
I mean when you call the menu and you close it, then you call it again, it will shutdown faster then 10 seconds because the task is still active from the first call. PHP Code:
|
Re: Stop set_task if menu doesn't exist.
Make sure you include... This should work if you use the code ive changed if not post full code and ill fix until i get a compiled version.
PHP Code:
PHP Code:
|
Re: Stop set_task if menu doesn't exist.
I am using stripweapons.inc, it strips only the weapons that are in certain slot.
While compiling I get undefined symbol find_ent_by_class... Thanks for the defuser suggestion! EDIT: Can you make that thing with the bombsite in one code? It's hard to make them into 1 |
Re: Re: Stop set_task if menu doesn't exist.
Quote:
If your going to give the same stuff only thing different is the rifles. You can pull all of it out and have your switch only contain the rifle stuff the rest can go under it. As for the strip weapons. The stock is easier than an include when you release your plugin. If you do |
Re: Stop set_task if menu doesn't exist.
I just realized, that the code you written removes task after the player chose something. And I needed that it would remove task if the player close it or for example a vote appears over the menu. EDIT: I believe that the remove task should be something with menu_display function. How to check if menu_dislay is true or the menu_display exist?
|
Re: Re: Stop set_task if menu doesn't exist.
Quote:
|
Re: Stop set_task if menu doesn't exist.
I don't need to catch that. What I really need is to ckek if menu displays.
|
Re: Re: Stop set_task if menu doesn't exist.
Quote:
He explains exactly why what you want won't work without the include. He's got a forward that's called when the menu is destroyed by another menu but not every menu uses this method yet so it still wouldn't work. Maybe someone with better knowledge can figure something out but afaik there is no way |
Re: Stop set_task if menu doesn't exist.
I've coded that so you could use the menu only once per round and your code just stops the task if the player chooses something then the task is removed.
Btw, something wrond with your StripUserWeapons(id) |
Re: Re: Stop set_task if menu doesn't exist.
Quote:
Secondly them the remove task there is pointless but in the code you gave us you can't tell that. |
| All times are GMT -4. The time now is 20:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.