Raised This Month: $ Target: $400
 0% 

bool problem in menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Afro-Ankan
Member
Join Date: Jul 2009
Location: Sweden
Old 10-06-2010 , 16:16   bool problem in menu
Reply With Quote #1

PHP Code:
public Pistol_MainMenuiClient )
{
    if(!
b_HasMenu iClient ] )
    {
        
client_print(iClientprint_center"%s menu already enabled"PREFIX);
    }
    else
    {
        
client_print(iClientprint_center"%s menu enabled"PREFIX);
    }
        
    new 
title[75]; formatex(titlecharsmax(title), "\r%s \y- Weapon Menu"PREFIX );
    new 
menu menu_create(title"Pistol_Handle" );
    
    
menu_additem(menu"\wDeagle""1"0);
    
menu_additem(menu"\wUSP""2"0);
    
menu_additem(menu"\wGlock""3"0);
    
menu_additem(menu"\wFiveseven""4"0);
    
menu_addblank(menu1);
    
menu_addblank(menu1);
    
menu_addblank(menu1);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(iClientmenu0);

}

public 
Pistol_Handle(iClientmenuitem)
{
    
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
give_item(iClient,"weapon_deagle"
        }
        case 
2:
        {
            
give_item(iClient,"weapon_usp"
        }
        case 
3:
        {
            
give_item(iClient,"weapon_glock"
        }
        case 
4:
        {
            
give_item(iClient,"weapon_fiveseven"
        }
    }
    return 
PLUGIN_HANDLED;

__________________
My Current Projects:
Pistols vs Pistols Public
Progress [ | | | | | | | | | | ]
Only 10% Completed
Afro-Ankan is offline
Send a message via MSN to Afro-Ankan
 


Thread Tools
Display Modes

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 10:16.


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