Raised This Month: $ Target: $400
 0% 

Menu problems


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Basic-Master
Veteran Member
Join Date: Apr 2005
Location: hello pm
Old 05-28-2006 , 07:32   Re: Menu problems
Reply With Quote #3

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <tsfun> new inMenu[33] public plugin_init() {     register_plugin("Powerup Menu","unnamed","1.0")     register_clcmd("pumenu","ShowMenu",ADMIN_SLAY,"- shows the Powerup Menu")     register_menucmd(register_menuid("\yPowerup Menu:"),1023,"MenuPU") } public ShowMenu(id,level,cid) {     if(!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED     if(inMenu[id] == 1) {         inMenu[id] = 0 // need to close the menu here somehow         return PLUGIN_HANDLED     }     inMenu[id] = 1         new szMenuBody[256]     new keys     new nLen = format( szMenuBody, 255, "\yPowerup Menu:^n" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w0. Random" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Slow Motion" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Infite Ammo" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Kung Fu" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Slow Pause" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Double Firerate" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Grenade" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Health" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Armor" )     nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Superjump" )     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,"\yPowerup Menu:") // <<< title     return PLUGIN_CONTINUE } public MenuPU(id,key) {     switch(key) {         case 0: {             ts_givepwup(id,1)         }         case 1: {             ts_givepwup(id,2)         }         case 2: {             ts_givepwup(id,4)         }         case 3: {             ts_givepwup(id,8)         }         case 4: {             ts_givepwup(id,16)         }         case 5: {             ts_givepwup(id,32)         }         case 6: {             ts_givepwup(id,64)         }         case 7: {             ts_givepwup(id,128)         }         case 8: {             ts_givepwup(id,256)         }         case 9: {             ts_givepwup(id,0)         }     }     return PLUGIN_HANDLED }

try that
Basic-Master is offline
Send a message via ICQ to Basic-Master Send a message via MSN to Basic-Master
 



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:33.


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