Close menu
I think the solution is pretty easy but I'm new to pawn and I have no idea on how to do this.
My problem is the following: I have a menu that is only for terrorist and it shows up automatically when terrorist connect, and when terrorist are AFK the menu remains open and every round the teams change and the guy who was in T team, has the menu open and can use the optins in CT and he shouldnt. I think I can do this thing closing the menu in an event round end but how do I check for a menu that is open or how do I close it? Thanks If you didn't undesrtand my problem say so thatt I will try to explain better |
Re: Close menu
You can show them an empty menu, or try client_cmd(0, "slot 0"); or whatever the 0 key is binded to.
|
Re: Close menu
Quote:
1a. slot0 does not exist. 2. It must be one of the slot# commands. If your zero (0) key is bound to anything other than "slot10" then that key will not work for any menu. Therefore you can use the command "slot10" to remove the menu. |
Re: Close menu
If you just did menu_destroy(menu) would that do the trick if you created the menu in a global variable?
|
Re: Close menu
Quote:
Quote:
|
Re: Close menu
Quote:
|
Re: Close menu
Quote:
menu_destroy doesn't work like you said. client_cmd(id, "slot10"); works well. |
Re: Close menu
Also, adding a team check in the actual menu handler itself might not be a bad idea in case the menu manages to stay open somehow!
|
| All times are GMT -4. The time now is 22:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.