AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu Help = How to make menu close if its open when respawn or die. (https://forums.alliedmods.net/showthread.php?t=99409)

cikjam 08-05-2009 02:10

Menu Help = How to make menu close if its open when respawn or die.
 
Hello,

Like title says,
If you have blockmaker menu open last round and you win round or die,
the next round the menu always shows again, I dont want this.
I want the menu to close.

There should be a simple solution, but i couldn't find one.
Any help will be great.

Thanx
:):)

SnoW 08-05-2009 05:24

Re: Menu Help = How to make menu close if its open when respawn or die.
 
Don't know what blockmaker you use, but I believe it shows it manually again and has some variable counting if it's open or not, cause normally menus should get closed if you die or get spawned. Somehow you can test something smiliar as:
PHP Code:

new menunewmenu;
if( 
player_menu_infoindexmenunewmenu ) )
{
     
menu_cancelindex );
     
client_cmdindex"slot1" );



cikjam 08-10-2009 03:11

Re: Menu Help = How to make menu close if its open when respawn or die.
 
I need one menu only to close, rest is fine.
Could you have a look at blockmaker and tell me where I could do that. I tried looking but couldn't find anything.

Thanx

SnoW 08-10-2009 05:40

Re: Menu Help = How to make menu close if its open when respawn or die.
 
PHP Code:

#include <hamsandwich>
 
//plugin_init
RegisterHamHam_Spawn"player""fwSpawn");
 
public 
fwSpawnid )
{
     if( 
is_user_aliveid ) )
     {
          new 
menunewmenu;
          if( 
player_menu_infoindexmenunewmenu ) )
          {
               
menu_cancelindex );
               
client_cmdindex"slot1" );
               return 
HAM_HANDLED;
          }
     } 
     return 
HAM_IGNORED;




All times are GMT -4. The time now is 18:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.