AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to apply this into data/lang (https://forums.alliedmods.net/showthread.php?t=329912)

husam124 01-13-2021 03:56

how to apply this into data/lang
 
Solved

Natsheh 01-13-2021 04:11

Re: how to apply this into data/lang
 
When dealing with a problem post all the potential code.

husam124 01-13-2021 04:16

Re: how to apply this into data/lang
 
Quote:

Originally Posted by Natsheh (Post 2732409)
When dealing with a problem post all the potential code.

post edited

AnimalMonster 01-13-2021 04:23

Re: how to apply this into data/lang
 
Look, to make a lang file(register_dictionary) and get info from it you should use format/formatex(x, charsmax(x), "%L", LANG_*, "MY_LANG_TEXT") and in order to store it you should make the x a global.
I think this must be ok only if i didn't misunderstood.

husam124 01-13-2021 04:25

Re: how to apply this into data/lang
 
Quote:

Originally Posted by AnimalMonster (Post 2732411)
Look, to make a lang file(register_dictionary) and get info from it you should use format/formatex(x, charsmax(x), "%L", LANG_*, "MY_LANG_TEXT") and in order to store it you should make the x a global.
I think this must be ok only if i didn't misunderstood.

i dont think that i can use formatex in new const

Natsheh 01-13-2021 05:11

Re: how to apply this into data/lang
 
PHP Code:

client_print(idprint_chat" Your COLOR is : %L "LANG_SERVERg_iDataColors[g_iUserColor[id]][0]) 


husam124 01-13-2021 05:21

Re: how to apply this into data/lang
 
im talking about the menu if there is a possibility to add ML support to new szconsts

husam124 01-13-2021 05:23

Re: how to apply this into data/lang
 
the problem is in this code
Code:

new g_iDataColors[][][] =
{
        {"ML_WHITE", "255", "255", "255"},
        {"ML_RED", "255", "0", "0"},
        {"ML_GOLD", "255", "165", "0"},
        {"ML_YELLOW","255", "255", "0"},
        {"ML_GREEN", "0", "255", "0"},
        {"ML_BLUE", "0", "255", "255"},
        {"ML_PURPLE", "0", "0", "255"},
        {"ML_PINK", "128", "0", "128"}
};

after joining server it doesnt say ML_NOTFOUND:ML_WHITE it counts ML_WHITE as a normal name without directing it to data/lang

Natsheh 01-13-2021 07:28

Re: how to apply this into data/lang
 
Because you're formatting a normal string.

Use the symbol %L to format to Lang directive string.

OciXCrom 01-13-2021 08:28

Re: how to apply this into data/lang
 
If you're using AMXX 1.10, menus have an option to automatically use language keys instead of normal strings.


All times are GMT -4. The time now is 03:42.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.