Raised This Month: $ Target: $400
 0% 

Menu Issues


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 10-28-2005 , 23:21   Menu Issues
Reply With Quote #1

Okay. I've had this problem for quite awhile now. No idea why, but my menu is way screwed up.

Everytime I go to the menu by typing "/ninjamenu" it automatically sets my class to "Strong", and the menu doesn't show.

the second time I type it, it gives me the error that "I'm already a Strong Ninja, pick something else". And shows the menu, but I can't close it using the Exit button. Pretty sure that's just a chuunk of code I left out, but doesn't explain the above errors.

Here's the menu code.

Code:
    register_menucmd(register_menuid("menu_ChooseType"),1023,"DoChooseType");

Code:
public ChooseType(id) {             new menu[192]       format(menu, 191, "Ninja Mod: Choose Ninja Type^n^n1. Strong^n2. Fast^n3. Stealthy^n4. Balanced^n^n0. Exit")       new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)     show_menu(id, keys, menu, 15, "menu_ChooseType")               return PLUGIN_HANDLED }   public DoChooseType(id, key) {             switch(key) {                   case 0: {                             if(PlayerClass[id] == CLASS_STRONG) {                                     client_print(id, print_chat, "[Ninja Mod] You are already a Strong Ninja! Choose something else!")                   ChooseType(id)                             return PLUGIN_HANDLED               }                           PlayerClass[id] = CLASS_STRONG             set_user_maxspeed(id,320.0)             cs_set_user_model(id,"models/player/ninja.mdl")             client_print(id, print_chat, "[Ninja Mod] You are now a Strong Ninja!")                           return PLUGIN_HANDLED         }                   case 1: {                             if(PlayerClass[id] == CLASS_FAST) {                                     client_print(id, print_chat, "[Ninja Mod] You are already a Fast Ninja! Choose something else!")                   ChooseType(id)                   return PLUGIN_HANDLED               }                           PlayerClass[id] = CLASS_FAST               set_user_maxspeed(id,1000.0)             cs_set_user_model(id,"models/player/ninja.mdl")             client_print(id, print_chat, "[Ninja Mod] You are now a Fast Ninja!")                             return PLUGIN_HANDLED         }                     case 2: {                             if(PlayerClass[id] == CLASS_STEALTHY) {                                     client_print(id, print_chat, "[Ninja Mod] You are already a Steatlhy Ninja! Choose something else!")                   ChooseType(id)                   return PLUGIN_HANDLED               }                           PlayerClass[id] = CLASS_STEALTHY               set_user_maxspeed(id,320.0)             cs_set_user_model(id,"models/player/ninja.mdl")             client_print(id, print_chat, "[Ninja Mod] You are now a Stealthy Ninja!")                             return PLUGIN_HANDLED         }                         case 3: {                             if(PlayerClass[id] == CLASS_BALANCED) {                                     client_print(id, print_chat, "[Ninja Mod] You are already a Balanced Ninja! Choose something else!")                   ChooseType(id)                   return PLUGIN_HANDLED               }                           PlayerClass[id] = CLASS_BALANCED               set_user_maxspeed(id,320.0)             cs_set_user_model(id,"models/player/ninja.mdl")             client_print(id, print_chat, "[Ninja Mod] You are now a Balanced Ninja!")                             return PLUGIN_HANDLED         }     }           return PLUGIN_HANDLED   }
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
 


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


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