Quote:
Originally Posted by OciXCrom
Without posting the plugin(s) you're using at the moment, we would not know how to (help you) edit them.
How do we make a menu of something that doesn't exist?
|
De esta manera, saludos!
PHP Code:
#include <amxmodx>
#define PLUGIN "Menu de Comandos"
#define VERSION "1.1"
#define AUTHOR "[N]drs"
enum _:Items_Info
{
ITEM_NAME[32],
ITEM_CMD[32]
}
// El Ășltimo item no debe llevar coma
new const Items[][Items_Info] = {
{"Comprar R8 Resolver", "say r8"},
{"Comprar CZ75", "say cz75"},
{"Comprar P2000", "p2000"},
{"Comprar Zeus", "zeus"},
{"Comprar Bizon", "say bizon"},
{"Comprar Mag7 CT", "say mag7"},
{"Comprar sawedoff TT", "say sawedoff"},
{"Comprar Escopeta KSG CT", "ksg"},
{"Comprar Sniper No", "awpns"},
{"Comprar Rifle TT", "whitedeath"},
{"Comprar MP5 GO", "say mp5sd"},
{"Comprar MiniGun", "say /minigun"},
{"Comprar Zeasdus", "zesdaus"}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("nightvision", "menu")
}
public menu(id)
{
new iMenu = menu_create("\wArmas Especiales: [USP] \r[\yv1.0\r]", "handler_menu")
for(new i; i < sizeof(Items) - 1; i++)
menu_additem(iMenu, Items[i][ITEM_NAME])
menu_display(id, iMenu)
return PLUGIN_HANDLED
}
public handler_menu(id, iMenu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(iMenu)
return PLUGIN_HANDLED
}
client_cmd(id, "%s", Items[item][ITEM_CMD])
menu_destroy(iMenu)
return PLUGIN_HANDLED
}