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

Open menu by command?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cirovic
Senior Member
Join Date: Sep 2019
Old 05-08-2020 , 15:07   Open menu by command?
Reply With Quote #1

I need plugin that will open menu when someone type for example: /menu
Opens menu for only reading.. for example:
1.Test
2.Test
3.Test
4.Test
5.Test
6.Test
7.Test
8.Test
9.Test

0.Exit
Cirovic is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-08-2020 , 15:12   Re: Open menu by command?
Reply With Quote #2

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "AlferD"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /menu""ShowMenu")
}

public 
ShowMenu(id)
{
    new 
menu menu_create("Menu""Commands");
    
         
menu_additemmenu"test1""1");
         
menu_additemmenu"test2""2");
         
menu_additemmenu"test3""3");
         
menu_additemmenu"test4""4");
    
menu_additemmenu"test5""5");
    
menu_additemmenu"test6""6");
    
menu_additemmenu"test7""7");
    
menu_additemmenu"test8""8");
    
menu_additemmenu"test9""9");

    
menu_setpropmenuMPROP_EXITMEXIT_ALL );
     
    
menu_displayidmenu);
}

public 
Commands(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_cancel(id);
        return 
PLUGIN_HANDLED;
    }

    new 
command[6], accessname[64], callback;

    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

    switch(
item)
    {
        case 
1client_cmd(id"say test1");
        case 
2client_cmd(id"say test2");
        case 
3client_cmd(id"say test3");
        case 
4client_cmd(id"say test4");
        case 
5client_cmd(id"say test5");
        case 
6client_cmd(id"say test6");
        case 
7client_cmd(id"say test7");
        case 
8client_cmd(id"say test8");
        case 
9client_cmd(id"say test9");
    }

    
menu_destroy(menu);

    return 
PLUGIN_HANDLED


Last edited by alferd; 05-08-2020 at 15:53.
alferd is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 05-08-2020 , 15:35   Re: Open menu by command?
Reply With Quote #3

does not open menu.
Cirovic is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-08-2020 , 15:53   Re: Open menu by command?
Reply With Quote #4

Quote:
Originally Posted by Cirovic View Post
does not open menu.
Ohh,Sorry Try Again
alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-08-2020 , 15:58   Re: Open menu by command?
Reply With Quote #5

https://forums.alliedmods.net/showthread.php?t=284324
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Cirovic
Senior Member
Join Date: Sep 2019
Old 05-08-2020 , 17:25   Re: Open menu by command?
Reply With Quote #6

oci creatre me goals ingame creating pls
Cirovic is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-08-2020 , 20:38   Re: Open menu by command?
Reply With Quote #7

Quote:
Originally Posted by Cirovic View Post
oci creatre me goals ingame creating pls
What?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Cirovic
Senior Member
Join Date: Sep 2019
Old 05-12-2020 , 10:21   Re: Open menu by command?
Reply With Quote #8

create plugin that will enable me to add models on specific map with command.
Cirovic is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-12-2020 , 10:40   Re: Open menu by command?
Reply With Quote #9

Quote:
Originally Posted by Cirovic View Post
create plugin that will enable me to add models on specific map with command.
Search...
alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-12-2020 , 13:30   Re: Open menu by command?
Reply With Quote #10

Quote:
Originally Posted by Cirovic View Post
create plugin that will enable me to add models on specific map with command.
How is this relevant to this thread? Create a new thread if you have a totally different request.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 00:04.


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