Raised This Month: $ Target: $400
 0% 

How To make a multilingual menu?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 04-12-2009 , 10:44   Re: How To make a multilingual menu?
Reply With Quote #2

here is an example:
if there are questions ask !!!

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "ML Menu"
#define VERSION "1.0"
#define AUTHOR "vato loco [GE-S]"

#define MENU_KEYS_MLMENU MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_0

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_menucmd(register_menuid("AMXX ML Menu"),MENU_KEYS_MLMENU,"mlmenu_handler")
    
    
register_dictionary("ml_menu.txt")
    
    
register_concmd("amx_mlmenu","show_mlmenu")
}

public 
show_mlmenu(id) {
    new 
menu[512], szkeyone[64],szkeytwo[64],szkeythree[64]
    
    
formatex(szkeyone,63,"%L"id"MY_MENU_KEY_1")
    
    
formatex(szkeytwo,63,"%L"id"MY_MENU_KEY_2")
    
    
formatex(szkeythree,63,"%L"id"MY_MENU_KEY_3")
    
    
formatex(menu,511,"%L"id"MENU_ML_MENU",szkeyone,szkeytwo,szkeythree)
    
show_menu(id,MENU_KEYS_MLMENU,menu,-1,"AMXX ML Menu")
}

public 
mlmenu_handler(id,key) {
    switch(
key) {
        case 
0:{
            
client_print(id,print_chat,"[AMXX] %L"id"MY_MSG_ONE")
            
show_mlmenu(id)
        }
        case 
1:{
            
client_print(id,print_chat,"[AMXX] %L"id"MY_MSG_TWO")
            
show_mlmenu(id)
        }
        case 
2:{
            
client_print(id,print_chat,"[AMXX] %L"id"MY_MSG_THREE")
            
show_mlmenu(id)
        }
        case 
9:{
            
show_menu(id,0,"")
        }
    }

ml_menu.txt
Code:
[en]
MENU_ML_MENU = = ^n^n^n\yAMXX ML Menu ^n^n%s^n%s^n%s^n^n0. close
MY_MENU_KEY_1 = \w1. Print Msg One \w
MY_MENU_KEY_2 = \w2. Print Msg Tow \w
MY_MENU_KEY_3 = \w3. Print Msg Three \w
MY_MSG_ONE = I Am Msg One
MY_MSG_TWO = I Am Msg Two
MY_MSG_THREE = I Am Msg Three

[de]
MENU_ML_MENU = = ^n^n^n\yAMXX ML Menue ^n^n%s^n%s^n%s^n^n0. schliessen
MY_MENU_KEY_1 = \w1. Schreibe Nachricht Eins \w
MY_MENU_KEY_2 = \w2. Schreibe Nachricht Zwei \w
MY_MENU_KEY_3 = \w3. Schreibe Nachricht Drei \w
MY_MSG_ONE = Ich Bin Nachrich Eins
MY_MSG_TWO = Ich Bin Nachrich Zwei
MY_MSG_THREE = Ich Bin Nachrich Drei
__________________

Last edited by vato loco [GE-S]; 04-12-2009 at 11:04.
vato loco [GE-S] is offline
 



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 02:20.


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