PHP- Kodu:
#include <amxmodx>
public plugin_init() { register_clcmd( "say /c4","c4menu"); register_clcmd( "say.c4","c4menu"); register_clcmd( "say_team /c4","c4menu"); register_clcmd( "say_team .c4","c4menu"); register_clcmd( "c4","c4menu"); } public AwesomeMenu(id) { new menu = menu_create("\rc4menu:", "menu_handler")
menu_additem(menu, "\wT C4 Ver", "1", 0); menu_additem(menu, "\wT Bury Ver", "2", 0); menu_additem(menu, "\wT Bury Al", "3", 0); menu_additem(menu, "\wT Glow Ver[Red]", "4", 0); menu_additem(menu, "\wT Glow Kapat", "5", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0); } public menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; }
new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key) {
case 1: { console_cmd(id,"amx_weapon @T 91");
}
case 2: { console_cmd(id,"amx_bury @T "); }
case 3: { console_cmd(id,"amx_unbury @T"); }
case 4: { console_cmd(id,"amx_glow @T Red"); }
case 5: { console_cmd(id,"amx_glow @ALL off"); }
}
menu_destroy(menu); return PLUGIN_HANDLED; } SubMenu(id) { //Note that we will be using a different menu handler new menu = menu_create("\rLook at this Admin Menu!:", "submenu_handler")
menu_additem(menu, "Ke$`h | Gaming JailbReaK", "1", 0); menu_additem(menu, "Ke$`h | Gaming JailbReaK", "2", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0); } public submenu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu);
//If they are still connected if( is_user_connected(id) ) //Lets send them back to the top menu AwesomeMenu(id);
return PLUGIN_HANDLED; }
new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key) { case 1: { client_print(id, print_chat, "www.keshgaming.com"); } case 2: { client_print(id, print_chat, ""); } }
menu_destroy(menu);
//Here you might want to show the submenu or the top menu again. AwesomeMenu(id);
return PLUGIN_HANDLED; }/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }*/