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

how to apply this into data/lang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
husam124
Member
Join Date: Jul 2017
Location: Palestine
Old 01-13-2021 , 02:56   how to apply this into data/lang
Reply With Quote #1

Solved
__________________
supreme being bow to me humans

Last edited by husam124; 01-13-2021 at 11:32.
husam124 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-13-2021 , 03:11   Re: how to apply this into data/lang
Reply With Quote #2

When dealing with a problem post all the potential code.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-13-2021 at 03:12.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
husam124
Member
Join Date: Jul 2017
Location: Palestine
Old 01-13-2021 , 03:16   Re: how to apply this into data/lang
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
When dealing with a problem post all the potential code.
post edited
__________________
supreme being bow to me humans
husam124 is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 01-13-2021 , 03:23   Re: how to apply this into data/lang
Reply With Quote #4

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.

Last edited by AnimalMonster; 01-13-2021 at 03:24.
AnimalMonster is offline
husam124
Member
Join Date: Jul 2017
Location: Palestine
Old 01-13-2021 , 03:25   Re: how to apply this into data/lang
Reply With Quote #5

Quote:
Originally Posted by AnimalMonster View Post
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
__________________
supreme being bow to me humans
husam124 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-13-2021 , 04:11   Re: how to apply this into data/lang
Reply With Quote #6

PHP Code:
client_print(idprint_chat" Your COLOR is : %L "LANG_SERVERg_iDataColors[g_iUserColor[id]][0]) 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-13-2021 at 04:12.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
husam124
Member
Join Date: Jul 2017
Location: Palestine
Old 01-13-2021 , 04:21   Re: how to apply this into data/lang
Reply With Quote #7

im talking about the menu if there is a possibility to add ML support to new szconsts
__________________
supreme being bow to me humans
husam124 is offline
husam124
Member
Join Date: Jul 2017
Location: Palestine
Old 01-13-2021 , 04:23   Re: how to apply this into data/lang
Reply With Quote #8

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
__________________
supreme being bow to me humans
husam124 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-13-2021 , 06:28   Re: how to apply this into data/lang
Reply With Quote #9

Because you're formatting a normal string.

Use the symbol %L to format to Lang directive string.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-13-2021 at 06:29.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-13-2021 , 07:28   Re: how to apply this into data/lang
Reply With Quote #10

If you're using AMXX 1.10, menus have an option to automatically use language keys instead of normal strings.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 15:29.


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