AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Destroy menu to all (https://forums.alliedmods.net/showthread.php?t=162843)

Diegorkable 07-23-2011 15:23

Destroy menu to all
 
I have a voting for something in the server, and when the vote ends people still get to look at the menu, until they press on a choice or choose MENU_EXIT. How can I destroy the menu to all the players? is there a function for it?

nikhilgupta345 07-23-2011 15:25

Re: Destroy menu to all
 
Loop through the players and use

PHP Code:

show_menu(id0"^n"1); 


Emp` 07-23-2011 16:06

Re: Destroy menu to all
 
Quote:

Originally Posted by nikhilgupta345 (Post 1516925)
Loop through the players and use

PHP Code:

show_menu(id0"^n"1); 


You can actually use 0 instead of id to show to all players.

nikhilgupta345 07-23-2011 16:58

Re: Destroy menu to all
 
Oh, because on the funcwiki it says player index between 1 and 32, so I didn't think 0 could be passed for all players.

My bad.

DjOptimuS 07-23-2011 17:51

Re: Destroy menu to all
 
http://www.amxmodx.org/funcwiki.php?go=func&id=1050

fysiks 07-23-2011 17:53

Re: Destroy menu to all
 
Quote:

Originally Posted by DjOptimuS (Post 1517014)

That destroys the menu resource and memory usage but does not change the menu on a player's screen which is to what the OP was refering.

Diegorkable 07-23-2011 19:34

Re: Destroy menu to all
 
@nikhilgupta, what is the "^n" for?

HBxander 07-23-2011 20:16

Re: Destroy menu to all
 
Its for 'cleaning' the line, instead of adding some new text.
^n just change to next line, when you use that, the menu will be 'invisible' since its a new menu without anything showing.

Emp` 07-23-2011 20:21

Re: Destroy menu to all
 
Quote:

Originally Posted by Diegorkable (Post 1517060)
@nikhilgupta, what is the "^n" for?

You can't send a blank menu ("") or just a space (" "), but "^n" works.


All times are GMT -4. The time now is 00:46.

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