Raised This Month: $ Target: $400
 0% 

Press N get menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
asdfdsdf
AlliedModders Donor
Join Date: Aug 2010
Location: Belgium
Old 10-24-2013 , 16:24   Press N get menu
Reply With Quote #1

Hello i saw somewhere on a server when i pressed n (nightvision) a menu pops up with i would also like to have that in my plugin but im noob in coding if anyone can help me if its possible ofcourse grtz heres the code

PHP Code:
#include <amxmodx>


new g_szTitle[] = "JailBreak Menu";
 
public 
plugin_init()
{

             
register_plugin("JbMenu""1.1""asdfdsdf");
             
register_clcmd("say /jbmenu""ShowMenu"_"");
        
         
    
       
}
public 
ShowMenu(id)
{
       
         new 
iNum
         
         
new iMinutes
         
         
new CurrentMap[33]
         
        new 
szMenuTitle[150]
         
        
iMinutes get_timeleft( ) / 60
         
// gets the amount of players on server and saves it into iNum
        
iNum get_playersnum( )
         
         
get_mapname(CurrentMapcharsmax(CurrentMap));
         
        
formatex(szMenuTitlecharsmax(szMenuTitle), "\r\y%s^n\rCurrent Map:\w%s^n\w%d \yPlayers Online\r| \w%d \yMinutes left\r| \yYou have \w%i$\yJbCash",g_szTitleCurrentMapiNumiMinutes);
        new 
menu menu_create(szMenuTitle"Jb_Menu");
         
         
        
menu_additem(menu"VIP Menu"""0); // case 0
        
menu_additem(menu"JbShop"""0); // case 1
        
menu_additem(menu"Achievements"""0); // case 2
        
menu_additem(menu"Playtime"""0); // case 3
        
menu_additem(menu"CashTop"""0); // case 4
        
menu_additem(menu"Rules"""0); // case 5
        
menu_additem(menu"Change Team"""0); // case 6
        
 
        
menu_setprop(menuMPROP_EXITMEXIT_ALL);
 
        
menu_display(idmenu0);
 
        return 
PLUGIN_HANDLED;
}
public 
Jb_Menu(idmenuitem)
{
        if(
item == MENU_EXIT)
        {
                
menu_cancel(id);
                return 
PLUGIN_HANDLED;
        }
 
        new 
command[6], name[64], accesscallback;
 
        
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);
 
        switch(
item)
        {
                case 
0:
                {
                         
client_cmd(id"say /menu")
                        
client_print(idprint_chat"You have selected the VIP Menu");
                }
                case 
1:
                {
                        
client_cmd(id"say /jbshop")
                        
client_print(idprint_chat"You have selected The JailBreakShop");
                }
                case 
2:
                {
                        
client_cmd(id"say /ac")
                        
client_print(idprint_chat"You have selected The Achievements Menu");
                }
                case 
3:
                {
                        
client_cmd(id"say /playtime")
                        
client_print(idprint_chat"You have selected Playtime Menu");
                }
                case 
4:
                {
                        
client_cmd(id"say /cashtop")
                        
client_print(idprint_chat"You have selected Cashtop");
                }
                case 
5:
                {
                        
client_cmd(id"say /rules")
                        
client_print(idprint_chat"You have selected Rules");
                }
           case 
6:
           {
           
show_menu_team(id)
           }
        }
 
        
menu_destroy(menu);
 
        return 
PLUGIN_HANDLED;

asdfdsdf is offline
 



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 23:15.


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