Raised This Month: $ Target: $400
 0% 

make a menu (ESF)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
turbex
Junior Member
Join Date: Jan 2007
Old 02-28-2007 , 00:25   make a menu (ESF)
Reply With Quote #1

i try this code:
PHP Code:
#include <amxmodx>
#include <engine>
#include <engine_const>
#include <fun>
#include <fakemeta>
#include <fakemeta_const>

public plugin_init()
{
    
register_plugin("turbexEvolution""1.0""tUrBeX");
    
    
/* Para el menú de jugadores */
    
register_clcmd("change_class""myClassMenu", -1"Menú de jugadores");
    
register_menucmd(register_menuid("[ Menú de jugadores (1/2) ]"), 1023"myMenuClassCommand");
    
register_menucmd(register_menuid("[ Menú de jugadores (2/2) ]"), 1023"myMenuClass2Command");
    
/* fin menú de jugadores */
    
    
return PLUGIN_CONTINUE;
}

public 
myClassMenu(id)

    new 
szMenuBody[256];
    new 
keys;
    
    
format(szMenuBody255"[ Escoger jugador (1/2) ]^n1. [ Buu ]^n2. [ Goku ]^n3. [ Gohan ]^n4. [ Krillin ]^n5. [ Frieza ]^n6. [ Piccolo ]^n7. [ Trunks ]^n8. [ Vegeta ]^n9.[ Siguiente ]^n^n0. Salir");
    
    
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9);
    
    
show_menu(idkeysszMenuBody, -1);

    return 
PLUGIN_HANDLED;
}

public 
myMenuClassCommand(id key)    
{
    switch(
key)
    {
  case 
0:
  {
      
client_cmd(id,"buu");  
  }
  case 
1:
  {
      
client_cmd(id,"goku");  
  }
  case 
2:
  {
      
client_cmd(id,"gohan");  
  }
  case 
3:
  {
      
client_cmd(id,"krillin");  
  }
  case 
4:
  {
      
client_cmd(id,"frieza");  
  }
  case 
5:
  {
      
client_cmd(id,"piccolo");  
  }
  case 
6:
  {
      
client_cmd(id,"trunks");  
  }
  case 
7:
  {
      
client_cmd(id,"vegeta");  
  }  
  case 
8:
  {
      
myClass2Menu(id);      
  }
  case 
9client_print(idprint_chat"-");
    }    
    return 
PLUGIN_HANDLED;
}

public 
myClass2Menu(id)    
{
    new 
szMenuBody[256];
    new 
keys;
    
    
format(szMenuBody255"[ Escoger jugador (2/2) ]^n1. [ Cell ]^n2. [ OtherPlayer ]^n3. [ --- ]^n4. [ --- ]^n5. [ --- ] ^n6. [ --- ]^n7. [ --- ]^n8. [ --- ]^n9. [ Anterior ]^n^n0. Salir");
    
    
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9);
    
    
show_menu(idkeysszMenuBody, -1);
    
    return 
PLUGIN_HANDLED;
}

public 
myMenuClass2Command(id key)    

    switch(
key)    
    {
  case 
0:
  {
      
client_cmd(id,"cell");      
  }  
  case 
1:
  {
      
client_print(idprint_chat"other player");      
  }
  case 
2:
  {
      
client_print(idprint_chat"-");      
  }
  case 
3:
  {
      
client_print(idprint_chat"-");      
  }
  case 
4:
  {
      
client_print(idprint_chat"-");      
  }
  case 
5:
  {
      
client_print(idprint_chat"-");      
  }
  case 
6:
  {
      
client_print(idprint_chat"-");      
  }
  case 
7:
  {
      
client_print(idprint_chat"-");      
  }  
  case 
8:
  {
      
myClassMenu(id);
  }    
  case 
9client_print(idprint_chat"-");
    }    
    return 
PLUGIN_HANDLED;

this is a my class menu, when i press "c" (menu class) the plugin shows the menu, but.... if i press a number (any option of menu)... show a menu of add bot.... why¿?
in few words.... the plugin doesnt work correctly... only show the menu... but... if i press a option... shows the add bot menu.

any idea¿?
thanks!
turbex 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 00:45.


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