First tell me 1 thing. You want everyone to see this in french language or both language? and as for your request just change
hi, $h@DoW, thanks for your reply
I want the server client to show different item name according to different language settings (amx_langmenu), when user switch to "fr" he sees the item name will be "fr" language and "en" client will show "en" item name
Not possible because ZP loads names from the .ini file. You can go around it though by using a native that retrieves the item name. (THIS IS NOT TESTED, AND MAY NOT WORK.) In your armor plugin add this:
enum Pog { Text[33] } new iName[33][Pog]
//add a connect or auth idk man, or add the line if you have one already //You could add it somewhere else where it's called frequently. public client_connect(id) formatex(iName[id][Text], charsmax(iName[][Text]), "%L", LANG_PLAYER, "HUMANARMOR" )
//register a native or add a native to plugin natives if you have one public plugin_natives() register_native("zp_get_armor_name","native_get_armor_name")
//ya. public native_get_armor_name(plugin_id, num_params) {
new id = get_param(1) new ItemID = get_param(2)
//not found or wrong item
if(!id) return false;
if(ItemID != g_itemid_humanarmor) return false;
set_string(3, iName[id][Text], get_param(4))
return true; }
ZP 4.3: //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_menu_extras(id) //go in Item List for loop and then the switch (item) loop //go to the default cause //under ArrayGetString add your native, it will look like this: ArrayGetString(g_extraitem_name, item, buffer, charsmax(buffer)) zp_get_armor_name(id, item, buffer, charsmax(buffer))
ZP 5.0: (zp50_items.sma) //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_items_menu(id) //go in Item List for loop //under ArrayGetString add your native, it will look like this: ArrayGetString(g_ItemName, index, name, charsmax(name)) zp_get_armor_name(id, item, name, charsmax(name))
Not possible because ZP loads names from the .ini file. You can go around it though by using a native that retrieves the item name. (THIS IS NOT TESTED, AND MAY NOT WORK.) In your armor plugin add this:
enum Pog { Text[33] } new iName[33][Pog]
//add a connect or auth idk man, or add the line if you have one already //You could add it somewhere else where it's called frequently. public client_connect(id) formatex(iName[id][Text], charsmax(iName[][Text]), "%L", LANG_PLAYER, "HUMANARMOR" )
//register a native or add a native to plugin natives if you have one public plugin_natives() register_native("zp_get_armor_name","native_get_armor_name")
//ya. public native_get_armor_name(plugin_id, num_params) {
new id = get_param(1) new ItemID = get_param(2)
//not found or wrong item
if(!id) return false;
if(ItemID != g_itemid_humanarmor) return false;
set_string(3, iName[id][Text], get_param(4))
return true; }
ZP 4.3: //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_menu_extras(id) //go in Item List for loop and then the switch (item) loop //go to the default cause //under ArrayGetString add your native, it will look like this: ArrayGetString(g_extraitem_name, item, buffer, charsmax(buffer)) zp_get_armor_name(id, item, buffer, charsmax(buffer))
ZP 5.0: (zp50_items.sma) //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_items_menu(id) //go in Item List for loop //under ArrayGetString add your native, it will look like this: ArrayGetString(g_ItemName, index, name, charsmax(name)) zp_get_armor_name(id, item, name, charsmax(name))
You are done, now test and see if it works
hi, Gaspatcho, thanks for your reply
I tested the way you provided, unfortunately it doesn't work It only reads "en" text, when I switch to other language item name doesn't change to other language
Not possible because ZP loads names from the .ini file. You can go around it though by using a native that retrieves the item name. (THIS IS NOT TESTED, AND MAY NOT WORK.) In your armor plugin add this:
enum Pog { Text[33] } new iName[33][Pog]
//add a connect or auth idk man, or add the line if you have one already //You could add it somewhere else where it's called frequently. public client_connect(id) formatex(iName[id][Text], charsmax(iName[][Text]), "%L", LANG_PLAYER, "HUMANARMOR" )
//register a native or add a native to plugin natives if you have one public plugin_natives() register_native("zp_get_armor_name","native_get_armor_name")
//ya. public native_get_armor_name(plugin_id, num_params) {
new id = get_param(1) new ItemID = get_param(2)
//not found or wrong item
if(!id) return false;
if(ItemID != g_itemid_humanarmor) return false;
set_string(3, iName[id][Text], get_param(4))
return true; }
ZP 4.3: //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_menu_extras(id) //go in Item List for loop and then the switch (item) loop //go to the default cause //under ArrayGetString add your native, it will look like this: ArrayGetString(g_extraitem_name, item, buffer, charsmax(buffer)) zp_get_armor_name(id, item, buffer, charsmax(buffer))
ZP 5.0: (zp50_items.sma) //add the native on top under one of the variables native zp_get_armor_name(id, item, MyName[], len)
//find show_items_menu(id) //go in Item List for loop //under ArrayGetString add your native, it will look like this: ArrayGetString(g_ItemName, index, name, charsmax(name)) zp_get_armor_name(id, item, name, charsmax(name))
You are done, now test and see if it works
hi, Gaspatcho, thanks for your reply
I tested the way you provided, unfortunately it doesn't work It only reads "en" text, when I switch to other language item name doesn't change to other language
Try adding this and see if it will update, change your lang and say /uplang