Quote:
Originally Posted by yas17sin
yes you can add item by using cmd of the nades plugin or any others .
here is a example :
PHP Code:
#include <amxmodx>
new menu;
public plugin_init()
{
register_clcmd( "buy", "main_menu")
}
public main_menu( id )
{
if(!is_user_alive( id ) )
return;
menu = menu_create( "Example Menu", "menu_handler" );
menu_additem( menu, " Tripe Nades", "", 0)
menu_additem( menu, "Admin Nade", "", ADMIN_BAN)
menu_display( id, menu, 0)
}
public menu_handler( id, menu, item)
{
switch( item )
{
case 0:
{
client_cmd( id, "get_tripenade" ) // this the cmd need to be register in the plugin of tripe nade
}
case 1:
{
client_cmd( id, "get_adminnade" ) // this cmd also need to be resgister in the plugin of admin nade
}
case MENU_EXIT:
{
// do nothing ?
}
}
menu_destroy( menu );
return PLUGIN_HANDLED;
}
|
Ok i got it . Thank you very much i will make it now ..
Just 1 more question
here
menu_additem( menu, " Tripe Nades", "", 0)
menu_additem( menu, "Admin Nade", "", ADMIN_BAN)
what are these
-> " "
-> why its 0 ?
-> Admin_ban ?
I mean values of what thing have you put there?