AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Use MENU one time per round. (https://forums.alliedmods.net/showthread.php?t=194076)

danielo_o 08-25-2012 03:48

Use MENU one time per round.
 
Please give me an example of using menu one time per round.(posting the code would be helpful)

Best regards, daniel.

dark_style 08-25-2012 05:27

Re: Use MENU one time per round.
 
You can use bool which you set to true at the menu's command ( where you open it ) and set it to false at the new round. Don't forget to open the menu only if the bool is false.

danielo_o 08-25-2012 06:22

Re: Use MENU one time per round.
 
Quote:

Originally Posted by dark_style (Post 1782146)
You can use bool which you set to true at the menu's command ( where you open it ) and set it to false at the new round. Don't forget to open the menu only if the bool is false.

Can't you post the full code?
Thanks.

dark_style 08-25-2012 07:23

Re: Use MENU one time per round.
 
Working with booleans isn't hard.. Search for Emp`'s tutorials - pawn picture tutorial and you may want to see his menu tutorial.

Edit: the bool should be set to true at the menu's handler not at the menu command function.

mottzi 08-26-2012 03:48

Re: Use MENU one time per round.
 
Here a pseudocode:

PHP Code:

new globalVariable

public menu
{
   if 
gloabalVariable 0
   
{
      
showMenu()
      
gloabalVariable 1
   
}
}

public 
eventNewRound
{
   
gloabalVariable 0



You should be using booleans for that, as already said.


All times are GMT -4. The time now is 05:53.

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