Raised This Month: $51 Target: $400
 12% 

Adding Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-20-2014 , 01:37   Adding Menu
Reply With Quote #1

I want to Add A menu in amxmodmenu . I have done some changes in plugin and want to add that plugin to amxmodmenu . When i Click that menu A submenu with players present in server must be come and when press the player name that command shoud be executed on player

the plugin is Pika If u want the script let me knw ill upload it

I want to add it in plugin not in customemnu.cfg

Last edited by tousif; 12-26-2014 at 06:10.
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2014 , 07:46   Re: Adding Menu
Reply With Quote #2

http://amxmodx.org/api/amxmisc/AddMenuItem
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-20-2014 , 08:10   Re: Adding Menu
Reply With Quote #3

MENU_PLUGIN: The exact case-insensitive name of plugin holding the menu command

Cant Understand this ^^ plzz help
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2014 , 08:18   Re: Adding Menu
Reply With Quote #4

It is the name of the plugin.... Examples
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Old 12-20-2014, 08:18
tousif
This message has been deleted by tousif.
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-20-2014 , 09:04   Re: Adding Menu
Reply With Quote #5

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < amxmisc >

public plugin_init ( )
{
register_plugin PLUGINVERSIONAUTHOR )

// Add your code here...
register_clcmd "amx_pika""cmdPika"ADMIN_LEVEL_D"<name or #userid>" );
register_clcmd("amx_pikamenu""ShowMenu"ADMIN_LEVEL_D"Opens Pika Menu");
server_cmd("amx_addmenuitem ^"Pika Menu^" ^"amx_pikamenu^" ^"hu^" ^"amx_pikav5.amxx^"");
}


public 
ShowMenu(id)
{
    new 
menu menu_create("Pika Menu""mh_PikaMenu");
    new 
players[32], pnumtempid;
    new 
szName[32], szUserId[32];
    
get_playersplayerspnum"f" );
   
    for ( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
get_user_nametempidszNamecharsmaxszName ) );
        
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridtempid ) );
        
menu_additemmenuszNameszUserId);
    }
    
menu_displayidmenu);
}


public 
mh_PikaMenu(idmenuitem)
{
new 
command[6], name[64], accesscallback;

menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

menu_destroy(menu);

return 
PLUGIN_HANDLED;

This is the plugin code I have removed some code I have added menu and in sub menu players list come I want when i press on player name the command must be executed ex:ban I ll change add that later just say how to do and * mark comes if player is admin

THANKS IN ADVANCE HOPE ILl Get will HELp

Last edited by tousif; 12-20-2014 at 09:06.
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2014 , 09:15   Re: Adding Menu
Reply With Quote #6

Code:
server_cmd("amx_addmenuitem ^"Pika Menu^" ^"amx_pikamenu^" ^"hu^" ^"amx_pikav5.amxx^"");

Code:
AddMenuItem("Pika Menu", "amx_pikamenu", ADMIN_LEVEL_D, PLUGIN);
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 12-20-2014 at 09:15.
YamiKaitou is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-20-2014 , 09:20   Re: Adding Menu
Reply With Quote #7

i must replace it ?
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2014 , 09:27   Re: Adding Menu
Reply With Quote #8

Yes
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-21-2014 , 03:13   Re: Adding Menu
Reply With Quote #9

That Pika Menu Is comming In amxmodmenu and I can see players also but when i press player that command is not executed on player plzz

Give me the code or Add in this code Thanks In advanced
PHP Code:

#include < amxmodx >
#include < cstrike >
#include < amxmisc >

public plugin_init ( )
{
register_plugin PLUGINVERSIONAUTHOR )

// Add your code here...
register_clcmd "amx_pika""cmdPika"ADMIN_LEVEL_D"<name or #userid>" );
register_clcmd("amx_pikamenu""ShowMenu"ADMIN_LEVEL_D"Opens Pika Menu");
server_cmd("amx_addmenuitem ^"Pika Menu^" ^"amx_pikamenu^" ^"hu^" ^"amx_pikav5.amxx^"");
}


public 
ShowMenu(id)
{
    new 
menu menu_create("Pika Menu""mh_PikaMenu");
    new 
players[32], pnumtempid;
    new 
szName[32], szUserId[32];
    
get_playersplayerspnum"f" );
   
    for ( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
get_user_nametempidszNamecharsmaxszName ) );
        
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridtempid ) );
        
menu_additemmenuszNameszUserId);
    }
    
menu_displayidmenu);
}


public 
mh_PikaMenu(idmenuitem)
{
new 
command[6], name[64], accesscallback;

menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

menu_destroy(menu);

return 
PLUGIN_HANDLED;

</span></span>
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-21-2014 , 06:44   Re: Adding Menu
Reply With Quote #10

That is because your menu doesn't do anything
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply



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 06:33.


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