Is there a limit for arrays?
#1

Hello! I'd like to make my server multilanguage.

I decided to make few mysql tables for the language (Table name: xy_lang Fields: key, value), and load their data to an array in SA-MP.

Code:
enum langInfo{
	KICK_MSG[],
	BAN_MSG[],
	JOIN_MSG[],
	etc...
}; 
new Language[MAX_LANGUAGE][langInfo];
and use it like SendClientMessage(playerid, -1, Language[LANGUAGE_INDEX][KICK_MSG]);

My question is that the enumeration have a maximum limit or i can pass all the in-game texts in it? ex 3-4000 elements.

Is it possible? Is there any easy way to make this?

We have a complete list of one language right now in pawn code like:

Code:
new 
	SQL_CONNECTION_STARTED[] = "SQL Connection was successful!",	

	PLAYER_JOINED_SERVER[] = "%s has joined the server.",
	PLAYER_LEFT_SERVER[] = "%s has left the server.",
	PLAYER_KICKED_SERVER_MSG[] = "%s has been kicked from the server by %s.",
This can be reusable in any other languages? How to?

Thanks!
Reply
#2

Or just use y_lang and avoid complicate your life. Or this: https://sampforum.blast.hk/showthread.php?tid=468821
Reply
#3

I cant use these bc i need more features.
Reply
#4

Okay, its true.

But, could I use your y_lang include for dialogs, textdraws, etc?

I want to make my server fully multilingual.
Reply
#5

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)