ML Support for menus?
could someone show how to add ML support for Menus
|
Re: ML Support for menus?
ML = multi lingual?
|
Re: ML Support for menus?
yeah
|
Re: ML Support for menus?
:D Ok well this time Im going to show everyone how to make a menu , and make it support multiple languges , and text from file . So first let me begin by saying , If you arnt famailar with amxmodx scripting read over my tutorials 1 and 2 before reading this one . Im going to asume you know the basices of the codeing .
Ok first like the rest of our scripts were going to make our includes . Menu are pretty much covered by amxmodx and misc . So no other modules are needed to make a menu . Code:
#include <amxmodx>Code:
new keys = MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4 | MENU_KEY_5 | MENU_KEY_6 | MENU_KEY_7 | MENU_KEY_8 | MENU_KEY_9Code:
public plugin_init()Code:
public raps_menu(id)%L Means we are calling to a Lang file (the dictioanry we registered earlier) , LANG_PLAYER meens were translating into the language of the current player . We could use the servers language which is LANG_SERVER . Next were calling "HI" , which is in the txt file . In the txt file youll see Code:
[en] //this meens english return PLUGIN_CONTINUE meens functions will keep going . The show menu function is what will actually make the menu display . id , keys and menu are already defined . so next the -1 means that we wont specify a set time for the menu to be displayed .The the menu that will be dispayed . Next up is what happens when some one make a choice from the menu Code:
public next_menu(id , key ) // this is the function called when a chioce is made last param from register_menucd[en] = english [es] = spanish [de] = german so on and so forth . for a full list , go and get your languages file from the amxmodx/data/lang folder . It has all the languages and symbols it supports . So here is our full code Code:
/* Plugin generated by AMXX-Studio */Code:
[en] |
Re: ML Support for menus?
rap thats kinda of not what im looking fo i want to add ML to something like this
Code:
|
Re: ML Support for menus?
For ML in menus is the same as in if you were going to use client_print, console_print.
|
Re: ML Support for menus?
Quote:
|
Re: ML Support for menus?
the way i added multi-lang for the menu is the same as if you were to do like so
Code:
:up: |
Re: ML Support for menus?
Quote:
Code:
new menu[512], Menuname[64], Item1[64], Item2[64], Item3[64], Item4[64] |
| All times are GMT -4. The time now is 04:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.