ayuda con el menu- quiero saber si esta bien o no?
#1
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Menu Escondidas"
#define VERSION "1.0"
#define AUTHOR "EL PRO XD :)"


public plugin_init()
{

register_clcmd("say /menu", "m")
}


public abrir_menu(id)
{

new Menu = menu_create("rMenu Escondidas", "mostrar_menu")
menu_additem(Menu, "wAreglar fps yFps" , "1", 0)
menu_additem(Menu, "wModels para Admines yModel" , "2", 0)
menu_additem(Menu, "wCambiar skins de Knife yKnife" , "3", 0)
menu_additem(Menu, "dLeer Las rReglas" , "4", 0)
menu_additem(Menu, "wTienda yShop" , "5", 0)


menu_setprop(Menu,MPROP_EXITNAME,"Salir")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, Menu, 0)
}


public mostrar_menu(id, Menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(Menu)
return PLUGIN_HANDLED
}

iName[64]
new iData[6];
new iAccess;
new iCallback;
new iName[64];
menu_item_getinfo(Menu, item, iAccess, iData, 5, iName, 63, iCallback)


switch (str_to_num(iData))
{
case 1:
{
client_cmd(id, "say /Fps")
}
case 2:
{
client_cmd(id, "say /Model")
}
case 3:
{
client_cmd(id, "say /Knife")
}
case 4:
{
client_cmd(id, "say /Reglas")
}
case 5:
{
client_cmd(id, "say /Shop")
}
}

return PLUGIN_HANDLED
}
#2
[php]/tmp/textYOVDZz.sma(42) : warning 217: loose indentation
/tmp/textYOVDZz.sma(42) : error 017: undefined symbol "iName"
/tmp/textYOVDZz.sma(42) : warning 215: expression has no effect
/tmp/textYOVDZz.sma(42) : error 001: expected token: ";", but found "]"
/tmp/textYOVDZz.sma(42) : error 029: invalid expression, assumed zero
/tmp/textYOVDZz.sma(42) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
#3
(15/11/2017, 08:35 PM)joseph escribió: /tmp/textYOVDZz.sma(42) : warning 217: loose indentation
/tmp/textYOVDZz.sma(42) : error 017: undefined symbol "iName"
/tmp/textYOVDZz.sma(42) : warning 215: expression has no effect
/tmp/textYOVDZz.sma(42) : error 001: expected token: ";", but found "]"
/tmp/textYOVDZz.sma(42) : error 029: invalid expression, assumed zero
/tmp/textYOVDZz.sma(42) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

"iName[64]"

------------>
Código PHP:
new iName[64

[Imagen: 76561198099584158.png]
Java, Mysql, PHP, Python and more.
#4
Tenes que borrar Iname[64] por que ya tenes creeada esa variable, sacando eso compila perfecto...
#5
de igual forma creo que no se le pueden enviar clients cmd que contengan say a los steam
#6
1
register_clcmd("say /menu", "m")


2
public mostrar_menu(id, Menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(Menu)
return PLUGIN_HANDLED
}


switch (item)
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)