Raised This Month: $ Target: $400
 0% 

Menus + Files !!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-16-2013 , 20:36   Re: Menus + Files !!
Reply With Quote #5

Blizzard hasn't understood anything lol.

Here is corrected code with comments :

PHP Code:
#define B1    1 << 1; // here should be 1<<0 but you can use already defined MENU_KEY_1
#define B0    1 << 10; // here should be 1<<9 but you can use already defined MENU_KEY_0

new const gKeyslolMenu MENU_KEY_1 MENU_KEY_0;

public 
plugin_init()
{
    
register_clcmd("say /lol""lolMenu");
    
register_menucmd(register_menuid("lolMenu"), gKeyslolMenu"handlelolMenu");

}

public 
lolMenu(id)
{    
    
    new 
szMenu[256];
        
    
addszMenu charsmax(szMenu) , "\r1. \wCall lol Menu Test^n" );
    
    
addszMenu charsmax(szMenu) , "\r0. \wClose" );

    
show_menuid gKeyslolMenu szMenu , -"lolMenu" );
    
}

public 
handlelolMenu(idkey)
{
    
// key is 0(for 1), 1(for2), etc.... 9(for0)
    // either you use those values : 0:lolProcess, 9;return
    // either you use this tip to convert to numbers 1,2,3,4,5,6,7,8,9,0
    
new num = (key+1) % 10
    switch (++
num)
    {
        case 
1: { lolProcess; }
        case 
0: { return; }
    }
   
   
// This can't happen since you have not registered keys
    // if (num != 1 && num != 0)
    // {
        // lolMenu(id);
    // }
}

public 
lolProcessid )
{
    
// Sum huge variables
    
    // Big loops
    // File open and get data from file.
    // Use of Cstrike and fun functions.
    // fclose.

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 16:26.


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