[ManiaScript] Players languages in split screen are always default

Moderators: w1lla, NADEO

Post Reply
User avatar
Dommy
Translator
Translator
Posts: 1794
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

[ManiaScript] Players languages in split screen are always default

Post by Dommy » 20 Dec 2017, 19:05

When in split screen, all users with login *splitscreen_n* have either empty Language property or it's set to "en", even if main user account (Users[0]) has different language (for example "pl"). Split screen users should interhit Language property from main user.

Temporary solution:

Code: Select all

// ---------------------------------- //
/** Get player language.
 *
 *	@param	_Player		The player to get their language.
 *
 *	@return		Language of the player.
 */
Text Private_GetLang(CPlayer _Player) {
	if (_Player == Null || _Player.User == Null) return "en";
	if (TL::Find("*splitscreen_", _Player.User.Login, True, True)) return Users[0].Language; // Account language in split screen mode
	return _Player.User.Language;
}

Post Reply

Return to “Trackmania² Reports”

Who is online

Users browsing this forum: No registered users and 1 guest