Raised This Month: $51 Target: $400
 12% 

Menu on off action


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cTn
Senior Member
Join Date: Oct 2005
Old 11-16-2005 , 14:22   Menu on off action
Reply With Quote #1

i find this cool menu on forum

Code:
#include <amxmod> 


public plugin_init() { 
    register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" ) 
    register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" ) 
    register_menucmd(register_menuid("\ySecond Menu:"), 1023, "MenuCommand2" ) 

    return PLUGIN_CONTINUE 
} 

public ShowMenu( id ) { 

    new szMenuBody[256] 
    new keys 

    new nLen = format( szMenuBody, 255, "\yFirst Menu:^n" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. First Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Second Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Third Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Fourth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Fifth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Sixth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Seventh Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Eighth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Next" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" ) 

    keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9) 

    show_menu( id, keys, szMenuBody, -1 ) 

    return PLUGIN_CONTINUE 
} 

public MenuCommand( id, key ) { 

    switch( key ) { 

        case 0: client_print( id, print_chat, "Menu Option #1" ) 

        case 1: client_print( id, print_chat, "Menu Option #2" ) 

        case 2: client_print( id, print_chat, "Menu Option #3" ) 

        case 3: client_print( id, print_chat, "Menu Option #4" ) 

        case 4: client_print( id, print_chat, "Menu Option #5" ) 

        case 5: client_print( id, print_chat, "Menu Option #6" ) 

        case 6: client_print( id, print_chat, "Menu Option #7" ) 

        case 7: client_print( id, print_chat, "Menu Option #8" ) 

        case 8: ShowMenu2(id)

        //case 9: client_print( id, print_chat, "Menu Option EXIT" ) 
    } 

    return PLUGIN_HANDLED 
}

// Menu 2

public ShowMenu2( id ) { 

    new szMenuBody[256] 
    new keys 

    new nLen = format( szMenuBody, 255, "\ySecond Menu:^n" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. First Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Second Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Third Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Fourth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Fifth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Sixth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Seventh Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Eighth Option" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Back" ) 
    nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" ) 

    keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9) 

    show_menu( id, keys, szMenuBody, -1 ) 

    return PLUGIN_CONTINUE 
} 

public MenuCommand2( id, key ) { 

    switch( key ) { 

        case 0: client_print( id, print_chat, "Menu Option #1" ) 

        case 1: client_print( id, print_chat, "Menu Option #2" ) 

        case 2: client_print( id, print_chat, "Menu Option #3" ) 

        case 3: client_print( id, print_chat, "Menu Option #4" ) 

        case 4: client_print( id, print_chat, "Menu Option #5" ) 

        case 5: client_print( id, print_chat, "Menu Option #6" ) 

        case 6: client_print( id, print_chat, "Menu Option #7" ) 

        case 7: client_print( id, print_chat, "Menu Option #8" ) 

        case 8: ShowMenu(id)

        //case 9: client_print( id, print_chat, "Menu Option EXIT" ) 
    } 

    return PLUGIN_HANDLED 
}
m question is how to set the on off text for example fr 1st option i add gravity for m person and after i press 1 menu set text to on and if i press 1 later text highlight is on off i think people now what i mean .. somethin like 1. Gravity 50% on/off
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
cTn
Senior Member
Join Date: Oct 2005
Old 11-17-2005 , 06:56  
Reply With Quote #2

heey no man now how to doo that? :X
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 11-17-2005 , 13:57  
Reply With Quote #3

maybe if you learn how to speak english someone would understand you!
__________________
atomic is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-17-2005 , 14:52  
Reply With Quote #4

sorry i mean just if can have options in menu on/off status information

for example i open this menu 3rd oprion is gravity so i see 3. Gravity on/off and if i press it this give me for example 50 % of m old gravity and now i see 3. Gravity on/off
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
cTn
Senior Member
Join Date: Oct 2005
Old 11-18-2005 , 03:20  
Reply With Quote #5

OMG PEOPLEEEEEEEEEEEEEEE
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
Jeff Mitchell
Member
Join Date: Nov 2005
Old 11-18-2005 , 09:08  
Reply With Quote #6

Speak english so we can understand you and don't use caps.
__________________
Jeff Mitchell is offline
cTn
Senior Member
Join Date: Oct 2005
Old 11-18-2005 , 14:46  
Reply With Quote #7

i think is realy hard to understand what i mean
__________________
cTn is offline
Send a message via ICQ to cTn Send a message via MSN to cTn
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 10:50.


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