09.09.2008, 14:38
This include is very useful for international and multi-lingual servers.
In version 1.0 it's possible to script with up to 2 languages easily.
- » ClientLanguageText(playerid, color, const message0[], const message1[]);
» ClientLanguageTextToAll(color, const message0[], const message1[]);
» GameLanguageText(playerid, const message0[], const message1[], time, style);
» GameLanguageTextToAll(const message0[], const message1[], time, style);
» SetPlayerLanguage(playerid, language);
Examples:
ClientLanguageText:
Code:
public OnPlayerSpawn(playerid) { ClientLanguageText(playerid, YELLOW, "This is an english text!", "Das ist ein deutscher Text!"); return 1; }
Code:
public OnPlayerSpawn(playerid) { ClientLanguageTextToAll(YELLOW, "Text for all english people!", "Text fьr alle deutschen Leute!"); return 1; }
Code:
public OnPlayerSpawn(playerid) { GameLanguageText(playerid, "This is an english text!", "Das ist ein deutscher Text!", 5000, 3); return 1; }
Code:
public OnPlayerSpawn(playerid) { GameLanguageTextToAll(playerid, "Text for all english people!", "Text fьr alle deutschen Leute!", 5000, 3); return 1; }
Code:
public OnPlayerSpawn(playerid) { SetPlayerLanguage(playerid, 0); // 0 for the first language, 1 for the second language return 1; }