Raised This Month: $32 Target: $400
 8% 

[Req] Multilingual Menu with Say commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 09-08-2020 , 19:27   [Req] Multilingual Menu with Say commands
Reply With Quote #1

Hello. I dont understand from coding at all. What i need is a multilingual menu with 4-5 option. I have say commands, so i just need to trigger them in menu.

Last edited by Snake.; 09-08-2020 at 19:30.
Snake. is offline
Send a message via Skype™ to Snake.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-08-2020 , 21:48   Re: [Req] Multilingual Menu with Say commands
Reply With Quote #2

You're going to need to provide more details of what you are requesting.
__________________
fysiks is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 09-09-2020 , 03:44   Re: [Req] Multilingual Menu with Say commands
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
You're going to need to provide more details of what you are requesting.
A menu with multilang and 4 items. When i click on items, some say commands will be executed. I dont know how else i can explain this.

Last edited by Snake.; 09-09-2020 at 03:45.
Snake. is offline
Send a message via Skype™ to Snake.
Thew_ConFiger
Member
Join Date: Apr 2019
Old 09-09-2020 , 10:09   Re: [Req] Multilingual Menu with Say commands
Reply With Quote #4

PHP Code:
#include <amxmodx> 

public plugin_init() 

    
register_plugin("My Menu""1.0""Me");  
    
register_concmd("say /thew_Configer""ShowMenu" ADMIN_ALL ); 
     


public 
ShowMenu(id

    new 
menu menu_create("YourSelf Menu  :""menu_handler"); 

    
menu_additem(menu"A" "" 0); // case 0 
    
menu_additem(menu"B" "" 0); // case 1
    
menu_additem(menu"C" "" 0); // case 2
    
menu_additem(menu"D" "" 0); // case 3


    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
    
    
menu_display(idmenu0); 

    return 
PLUGIN_HANDLED


public 
menu_handler(idmenuitem

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

    new 
command[6], name[64], accesscallback

    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback); 

    switch(
item
    { 
        case 
0client_cmd(id"say a");
        case 
1client_cmd(id"say b");
    case 
2client_cmd(id"say c");
    case 
3client_cmd(id"say d");



    
    } 


    
menu_destroy(menu); 

    return 
PLUGIN_HANDLED

Yea ?
You can change the name of ABCDE and in the cases change to you cmds

Last edited by Thew_ConFiger; 09-09-2020 at 10:35.
Thew_ConFiger is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 09-09-2020 , 10:55   Re: [Req] Multilingual Menu with Say commands
Reply With Quote #5

Quote:
Originally Posted by Thew_ConFiger View Post
PHP Code:
#include <amxmodx> 

public plugin_init() 

    
register_plugin("My Menu""1.0""Me");  
    
register_concmd("say /thew_Configer""ShowMenu" ADMIN_ALL ); 
     


public 
ShowMenu(id

    new 
menu menu_create("YourSelf Menu  :""menu_handler"); 

    
menu_additem(menu"A" "" 0); // case 0 
    
menu_additem(menu"B" "" 0); // case 1
    
menu_additem(menu"C" "" 0); // case 2
    
menu_additem(menu"D" "" 0); // case 3


    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
    
    
menu_display(idmenu0); 

    return 
PLUGIN_HANDLED


public 
menu_handler(idmenuitem

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

    new 
command[6], name[64], accesscallback

    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback); 

    switch(
item
    { 
        case 
0client_cmd(id"say a");
        case 
1client_cmd(id"say b");
    case 
2client_cmd(id"say c");
    case 
3client_cmd(id"say d");



    
    } 


    
menu_destroy(menu); 

    return 
PLUGIN_HANDLED

Yea ?
You can change the name of ABCDE and in the cases change to you cmds
Hey, ah thank you but i wanted a multilingual menu.
Snake. is offline
Send a message via Skype™ to Snake.
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-11-2020 , 09:04   Re: [Req] Multilingual Menu with Say commands
Reply With Quote #6

You will need to format item before putting it in menu_additem, but if using 1.8.3+ you can a little shorter:

1.8.2:
Code:
new item1[ 50 ]
formatex( item1, charsmax( item1 ), "%L", id, "LANG_ITEM1" )
//same for item2, item3, and then:

menu_additem( menu, item1 )
with 1.8.3+, there is 'fmt':
Code:
menu_additem( menu, fmt( "%L", id, "LANG_ITEM1" ) )
menu_additem( menu, fmt( "%L", id, "LANG_ITEM2" ) )
//ect...
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 09:34.


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