Raised This Month: $ Target: $400
 0% 

Menu help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-14-2012 , 15:51   Menu help
Reply With Quote #1

Hello there,

How can i show a menu to all the players without using a loop?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 05-14-2012 , 16:00   Re: Menu help
Reply With Quote #2

PHP Code:
menu_display0menu 
__________________

Last edited by Ex1ne; 05-14-2012 at 16:00.
Ex1ne is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-14-2012 , 16:00   Re: Menu help
Reply With Quote #3

You can't. Just use the loop.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-14-2012 , 16:03   Re: Menu help
Reply With Quote #4

But if im using the loop it will bug, well the timer will.
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-14-2012 , 16:05   Re: Menu help
Reply With Quote #5

Quote:
Originally Posted by Ex1ne View Post
PHP Code:
menu_display0menu 
That will throw an error. That function doesn't know to loop through players if you pass 0.

Quote:
Originally Posted by Bilal Pro View Post
But if im using the loop it will bug, well the timer will.
Then your code needs to be structured differently. Show your code.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-14-2012 , 16:15   Re: Menu help
Reply With Quote #6

PHP Code:
public KickMenu3(idmenuitem)
{    
    if (
item == MENU_EXIT)
    {
        
KickMenu(id)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64], accescallback
    menu_item_getinfo
(menuitemaccesdatacharsmax(data), namecharsmax(name), callback)
    
    
reason str_to_num(data)
    
    
// sound
    
client_cmd(0"spk misc/bilalvote.wav")
    
    
// task
    
set_task(15.0"EndVote")
    
    
// menu
    
KickMenu4(id)
    
    return 
PLUGIN_CONTINUE
}

public 
KickMenu4(id)
{
    
Timer 15
    set_task
(1.0"KickMenu5"TASKID__"a"Timer)
}


public 
KickMenu5(id)
{
    new 
players[32], iNum
    get_players
(playersiNum"ch")
    
    for (new 
i<iNumi++)
    {
        
Timer--
        
        if(
Timer 0
        {
            
KickMenu6(players[i])
        }
        
        if(
Timer == )
        {
            
ColorChat(0GREY"[sG] ^1The ^4vote^1 has ended!")
            
Timer 0
        
}
    }

My timer.
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 05-14-2012 at 16:16.
Bilal Pro is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-14-2012 , 16:27   Re: Menu help
Reply With Quote #7

PHP Code:
public KickMenu5(id)
{
    
Timer--
    
    if(
Timer 0)
    {
        new 
players[32], iNum
        get_players
(playersiNum"ch")
        
        for(new 
0iNumi++)
        {
            
KickMenu6(players[i])
        }
    }
    else
    {
        
ColorChat(0GREY"[sG] ^1The ^4vote^1 has ended!")
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-14-2012 , 16:32   Re: Menu help
Reply With Quote #8

Whats the difference? :O
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-14-2012 , 16:43   Re: Menu help
Reply With Quote #9

Quote:
Originally Posted by Bilal Pro View Post
Whats the difference? :O
The logic and structure. It's actually really obvious what the difference is.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 05-14-2012 at 16:43.
Exolent[jNr] is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-15-2012 , 08:14   Re: Menu help
Reply With Quote #10

Now it presses buttons automatic without touching it.
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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